Re: [PATCH] iommu/ipmmu-vmsa: Check for error num after setting mask

From: Joerg Roedel
Date: Mon Feb 14 2022 - 07:41:50 EST


On Mon, Feb 14, 2022 at 12:32:21PM +0000, Robin Murphy wrote:
> In this particular case it cannot fail on any system the driver actually
> runs on - it's a platform device so the dma_mask pointer is always
> initialised, then dma_direct_supported() on arm64 will always return true
> for any mask wider than 32 bits, while arm_dma_supported() will also always
> pass since a 32-bit system cannot have memory above 40 bits either.
>
> There's no great harm in adding the check for the sake of consistency, I
> guess, but it's purely cosmetic and not fixing anything.

Okay, thanks Robin and Nikita for looking to quickly into this. I will
apply it for 5.18 just to be on the safe side if the above assumptions
change.

Regards,

Joerg