OSDN Git Service

gpio: gpio-xilinx: Check return value of of_property_read_u32
authorSrinivas Neeli <srinivas.neeli@xilinx.com>
Thu, 12 Nov 2020 17:12:27 +0000 (22:42 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 18 Nov 2020 07:52:22 +0000 (08:52 +0100)
commitbea67aeab02208cbb2f3d60e358f331e2e6f1ab1
treea1781746c8634373977d5d23a6feb227dc7e2ede
parent0230a41ed6a818675c0166d506c3c9386af20986
gpio: gpio-xilinx: Check return value of of_property_read_u32

In two 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@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Addresses-Coverity: "check_return"
Link: https://lore.kernel.org/r/1605201148-4508-9-git-send-email-srinivas.neeli@xilinx.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-xilinx.c