plat-omap: check return value of ioremap()
Subsystems (2)
PATCH 1/1 plat-omap: check return value of ioremap()
When ioremap() failed,return err
Signed-off-by Ren Yu <[email protected]>
--- arch/arm/plat-omap/debug-leds.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/plat-omap/debug-leds.c +3 -0
@@ -109,6 +109,9 @@ static int fpga_probe(struct platform_device *pdev)return -ENODEV ; fpga =ioremap (iomem->start,resource_size (iomem)); +if (!fpga) +return -ENOMEM ; +writew_relaxed (0xff , &fpga->leds);for (i =0 ; i <ARRAY_SIZE (dbg_leds); i++) {
Signature · 1 line
2.25.1
Hi,
Quoted 1 line · Ren Yu
When
ioremap()failed,return err
This file is no longer being used and getting removed in Linux next. See commit 7058e68c2fed ("ARM: omap: remove debug-leds driver").
Thanks,
Tony
Quoted 22 lines
Signed-off-by Ren Yu <[email protected]>--- arch/arm/plat-omap/debug-leds.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/plat-omap/debug-leds.c +3
-0@@ -109,6 +109,9 @@ static int fpga_probe(struct platform_device *pdev)return -ENODEV ; fpga =ioremap (iomem->start,resource_size (iomem)); +if (!fpga) +return -ENOMEM ; +writew_relaxed (0xff , &fpga->leds);for (i =0 ; i <ARRAY_SIZE (dbg_leds); i++) {Signature · 1 line
2.25.1