gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe()
Subsystems (2)
PATCH 1/1 gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe()
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 <[email protected]>
--- drivers/gpio/gpio-qixis-fpga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-qixis-fpga.c +2 -2
@@ -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)
Signature · 1 line
2.51.0
Quoted 5 lines · Dan Carpenter
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 <[email protected]>
Reviewed-by Michael Walle <[email protected]>
-michael
Bartosz Golaszewski
AppliedFrom: Bartosz Golaszewski <[email protected]>
Quoted 4 lines · Dan Carpenter
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,
Signature · 1 line
Bartosz Golaszewski <[email protected]>