Skip to content

Commit

Permalink
ARM: pxa: fix return value check in pxa2xx_drv_pcmcia_probe()
Browse files Browse the repository at this point in the history
In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL pointer. The NULL test in the error
handling should be replaced with IS_ERR().

dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Eric Miao <[email protected]>
Signed-off-by: Haojian Zhuang <[email protected]>
  • Loading branch information
Wei Yongjun authored and hzhuang1 committed Sep 21, 2012
1 parent 5698bd7 commit e09a716
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pcmcia/pxa2xx_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
}

clk = clk_get(&dev->dev, NULL);
if (!clk)
if (IS_ERR(clk))
return -ENODEV;

pxa2xx_drv_pcmcia_ops(ops);
Expand Down

0 comments on commit e09a716

Please sign in to comment.