linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] plat-omap: check return value of ioremap()
@ 2022-04-25 11:08 Ren Yu
  2022-04-26  8:05 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Ren Yu @ 2022-04-25 11:08 UTC (permalink / raw)
  To: tony
  Cc: aaro.koskinen, linux, linux-omap, linux-arm-kernel, linux-kernel,
	liqiong, yuzhe, Ren Yu

When ioremap() failed,return err

Signed-off-by: Ren Yu <renyu@nfschina.com>
---
 arch/arm/plat-omap/debug-leds.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 2b698d074874..bf5034e10f6e 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -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++) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] plat-omap: check return value of ioremap()
  2022-04-25 11:08 [PATCH] plat-omap: check return value of ioremap() Ren Yu
@ 2022-04-26  8:05 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2022-04-26  8:05 UTC (permalink / raw)
  To: Ren Yu
  Cc: aaro.koskinen, linux, linux-omap, linux-arm-kernel, linux-kernel,
	liqiong, yuzhe, Arnd Bergmann

Hi,

* Ren Yu <renyu@nfschina.com> [220425 11:08]:
> 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

> Signed-off-by: Ren Yu <renyu@nfschina.com>
> ---
>  arch/arm/plat-omap/debug-leds.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
> index 2b698d074874..bf5034e10f6e 100644
> --- a/arch/arm/plat-omap/debug-leds.c
> +++ b/arch/arm/plat-omap/debug-leds.c
> @@ -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++) {
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-26  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 11:08 [PATCH] plat-omap: check return value of ioremap() Ren Yu
2022-04-26  8:05 ` Tony Lindgren

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).