* [PATCH] spi: rb4xx: Fix checking return value of devm_ioremap_resource()
@ 2015-04-30 2:06 Axel Lin
[not found] ` <1430359614.2531.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-04-30 2:06 UTC (permalink / raw)
To: Mark Brown; +Cc: Bert Vermeulen, linux-spi
devm_ioremap_resource() returns ERR_PTR on failure.
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-rb4xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c
index 50f49f3..3641d0e 100644
--- a/drivers/spi/spi-rb4xx.c
+++ b/drivers/spi/spi-rb4xx.c
@@ -145,7 +145,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
spi_base = devm_ioremap_resource(&pdev->dev, r);
- if (!spi_base)
+ if (IS_ERR(spi_base))
return PTR_ERR(spi_base);
master = spi_alloc_master(&pdev->dev, sizeof(*rbspi));
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: rb4xx: Fix checking return value of devm_ioremap_resource()
[not found] ` <1430359614.2531.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
@ 2015-05-01 16:36 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-05-01 16:36 UTC (permalink / raw)
To: Axel Lin; +Cc: Bert Vermeulen, linux-spi
[-- Attachment #1: Type: text/plain, Size: 130 bytes --]
On Thu, Apr 30, 2015 at 10:06:54AM +0800, Axel Lin wrote:
> devm_ioremap_resource() returns ERR_PTR on failure.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-01 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30 2:06 [PATCH] spi: rb4xx: Fix checking return value of devm_ioremap_resource() Axel Lin
[not found] ` <1430359614.2531.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
2015-05-01 16:36 ` Mark Brown
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).