All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: ralink: fix return value check in rt_timer_probe()
@ 2013-10-31  7:51 Wei Yongjun
  2013-10-31  9:52 ` John Crispin
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-10-31  7:51 UTC (permalink / raw)
  To: ralf, grant.likely, rob.herring, blogic; +Cc: yongjun_wei, linux-mips

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

In case of error, the function devm_request_and_ioremap() returns NULL
pointer not ERR_PTR(). Fix it by using devm_ioremap_resource() instead
of devm_request_and_ioremap().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 arch/mips/ralink/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/ralink/timer.c b/arch/mips/ralink/timer.c
index e49241a..2027857 100644
--- a/arch/mips/ralink/timer.c
+++ b/arch/mips/ralink/timer.c
@@ -126,7 +126,7 @@ static int rt_timer_probe(struct platform_device *pdev)
 		return -ENOENT;
 	}
 
-	rt->membase = devm_request_and_ioremap(&pdev->dev, res);
+	rt->membase = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(rt->membase))
 		return PTR_ERR(rt->membase);
 

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

* Re: [PATCH] MIPS: ralink: fix return value check in rt_timer_probe()
  2013-10-31  7:51 [PATCH] MIPS: ralink: fix return value check in rt_timer_probe() Wei Yongjun
@ 2013-10-31  9:52 ` John Crispin
  0 siblings, 0 replies; 2+ messages in thread
From: John Crispin @ 2013-10-31  9:52 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: ralf, grant.likely, rob.herring, yongjun_wei, linux-mips

On 31/10/13 08:51, Wei Yongjun wrote:
> From: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
>
> In case of error, the function devm_request_and_ioremap() returns NULL
> pointer not ERR_PTR(). Fix it by using devm_ioremap_resource() instead
> of devm_request_and_ioremap().
>
> Signed-off-by: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
Thanks for spotting the bug.

Acked-by: John Crispin <blogic@openwrt.org>

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

end of thread, other threads:[~2013-10-31  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31  7:51 [PATCH] MIPS: ralink: fix return value check in rt_timer_probe() Wei Yongjun
2013-10-31  9:52 ` John Crispin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.