aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/hsmmc.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-21 02:30:50 -0400
committerTony Lindgren <tony@atomide.com>2012-10-08 18:43:57 -0400
commit64de3a00a16bcdf940cbebb1b2dc05d7cc13fef5 (patch)
tree5d90dbfc3b0b45dcd2db39066b1c63d55f71128b /arch/arm/mach-omap2/hsmmc.c
parent9ee677231bbc6a9e6ec9057d33d81eb248742b0a (diff)
ARM: OMAP: hsmmc: fix return value check in omap_hsmmc_init_one()
In case of error, the function omap_device_alloc() returns ERR_PTR() not NULL pointer. The NULL test in the return value check 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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/hsmmc.c')
-rw-r--r--arch/arm/mach-omap2/hsmmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 03ebf47cfa9a..4d3a6324155f 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -523,7 +523,7 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
523 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id); 523 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);
524 524
525 od = omap_device_alloc(pdev, ohs, 1, NULL, 0); 525 od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
526 if (!od) { 526 if (IS_ERR(od)) {
527 pr_err("Could not allocate od for %s\n", name); 527 pr_err("Could not allocate od for %s\n", name);
528 goto put_pdev; 528 goto put_pdev;
529 } 529 }