mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 11 Aug 2025 13:36:16 +0000 (15:36 +0200)
committerLee Jones <lee@kernel.org>
Wed, 3 Sep 2025 11:45:27 +0000 (12:45 +0100)
commit1efbee6852f1ff698a9981bd731308dd027189fb
treef16d761292362cac3346f97bc6307a5395578bd2
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data()

Commit 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells")
removed the return value check from the call to gpiochip_add_data() (or
rather gpiochip_add() back then and later converted to devres) with no
explanation. This function however can still fail, so check the return
value and bail-out if it does.

Cc: stable@vger.kernel.org
Fixes: 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250811-gpio-mmio-mfd-conv-v1-1-68c5c958cf80@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/vexpress-sysreg.c