linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL
@ 2014-01-30 12:15 Dan Carpenter
  2014-01-30 13:00 ` Balaji T K
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-01-30 12:15 UTC (permalink / raw)
  To: Balaji T K; +Cc: Chris Ball, linux-mmc, linux-omap, kernel-janitors

The of_get_hsmmc_pdata() function returns NULL on error, it doesn't
return ERR_PTRs.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index bfb0dbd052c0..76dbc7b759c2 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1761,9 +1761,8 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 	match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
 	if (match) {
 		pdata = of_get_hsmmc_pdata(&pdev->dev);
-
-		if (IS_ERR(pdata))
-			return PTR_ERR(pdata);
+		if (!pdata)
+			return -ENOMEM;
 
 		if (match->data) {
 			const u16 *offsetp = match->data;

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

end of thread, other threads:[~2014-01-30 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-30 12:15 [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL Dan Carpenter
2014-01-30 13:00 ` Balaji T K

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