* [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL
@ 2014-01-30 12:15 ` Dan Carpenter
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
* [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL
@ 2014-01-30 12:15 ` Dan Carpenter
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
* Re: [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL
2014-01-30 12:15 ` Dan Carpenter
@ 2014-01-30 13:12 ` Balaji T K
-1 siblings, 0 replies; 4+ messages in thread
From: Balaji T K @ 2014-01-30 13:00 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Chris Ball, linux-mmc, linux-omap, kernel-janitors
On Thursday 30 January 2014 05:45 PM, Dan Carpenter wrote:
> 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;
Thanks for reporting this.
Caller needs to be fixed. I will send a patch to fix this.
>
> if (match->data) {
> const u16 *offsetp = match->data;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL
@ 2014-01-30 13:12 ` Balaji T K
0 siblings, 0 replies; 4+ messages in thread
From: Balaji T K @ 2014-01-30 13:12 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Chris Ball, linux-mmc, linux-omap, kernel-janitors
On Thursday 30 January 2014 05:45 PM, Dan Carpenter wrote:
> 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;
Thanks for reporting this.
Caller needs to be fixed. I will send a patch to fix this.
>
> if (match->data) {
> const u16 *offsetp = match->data;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-30 13:12 UTC | newest]
Thread overview: 4+ 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 12:15 ` Dan Carpenter
2014-01-30 13:00 ` Balaji T K
2014-01-30 13:12 ` Balaji T K
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.