[PATCH] gpio: gpio-xilinx: Check return value of of_property_read_u32

Andy Shevchenko andy.shevchenko at gmail.com
Fri Jun 17 09:02:00 PDT 2022


On Fri, Jun 17, 2022 at 7:20 AM Srinivas Neeli
<srinivas.neeli at xilinx.com> wrote:
>
> In five different instances the return value of "of_property_read_u32"
> API was neither captured nor checked.
>
> Fixed it by capturing the return value and then checking for any error.
>
> Signed-off-by: Srinivas Neeli <srinivas.neeli at xilinx.com>
> Addresses-Coverity: "check_return"

I think the best course of action here is to go and fix Coverity while
marking these as false positives.

To the idea of castings -- this is not good style and (many?)
maintainers in kernel do not accept such "workaround" for fixing
broken tool.

That said, NAK to the patch in any of its forms.

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list