* [PATCH next] gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe()
@ 2025-10-24 6:19 Dan Carpenter
2025-10-24 6:53 ` Michael Walle
2025-10-27 9:19 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-10-24 6:19 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Linus Walleij, Bartosz Golaszewski, Michael Walle, Frank Li,
linux-gpio, linux-kernel, kernel-janitors
The devm_platform_ioremap_resource() function doesn't return NULL, it
returns error pointers. Fix the checking to match.
Fixes: e88500247dc3 ("gpio: add QIXIS FPGA GPIO controller")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/gpio/gpio-qixis-fpga.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-qixis-fpga.c b/drivers/gpio/gpio-qixis-fpga.c
index 54c2c76822d5..6e67f43ac0bd 100644
--- a/drivers/gpio/gpio-qixis-fpga.c
+++ b/drivers/gpio/gpio-qixis-fpga.c
@@ -56,8 +56,8 @@ static int qixis_cpld_gpio_probe(struct platform_device *pdev)
* create our own from the MMIO space.
*/
reg = devm_platform_ioremap_resource(pdev, 0);
- if (!reg)
- return -ENODEV;
+ if (IS_ERR(reg))
+ return PTR_ERR(reg);
regmap = devm_regmap_init_mmio(&pdev->dev, reg, ®map_config_8r_8v);
if (!regmap)
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe()
2025-10-24 6:19 [PATCH next] gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe() Dan Carpenter
@ 2025-10-24 6:53 ` Michael Walle
2025-10-27 9:19 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Michael Walle @ 2025-10-24 6:53 UTC (permalink / raw)
To: Dan Carpenter, Ioana Ciornei
Cc: Linus Walleij, Bartosz Golaszewski, Frank Li, linux-gpio,
linux-kernel, kernel-janitors
On Fri Oct 24, 2025 at 8:19 AM CEST, Dan Carpenter wrote:
> The devm_platform_ioremap_resource() function doesn't return NULL, it
> returns error pointers. Fix the checking to match.
>
> Fixes: e88500247dc3 ("gpio: add QIXIS FPGA GPIO controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
-michael
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe()
2025-10-24 6:19 [PATCH next] gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe() Dan Carpenter
2025-10-24 6:53 ` Michael Walle
@ 2025-10-27 9:19 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-10-27 9:19 UTC (permalink / raw)
To: Ioana Ciornei, Dan Carpenter
Cc: Bartosz Golaszewski, Linus Walleij, Bartosz Golaszewski,
Michael Walle, Frank Li, linux-gpio, linux-kernel,
kernel-janitors
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Fri, 24 Oct 2025 09:19:21 +0300, Dan Carpenter wrote:
> The devm_platform_ioremap_resource() function doesn't return NULL, it
> returns error pointers. Fix the checking to match.
>
>
Applied, thanks!
[1/1] gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe()
https://git.kernel.org/brgl/linux/c/9452252dff94ff2cbcd33d3418c2b95ff74bdba5
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-27 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 6:19 [PATCH next] gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe() Dan Carpenter
2025-10-24 6:53 ` Michael Walle
2025-10-27 9:19 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).