aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/hsmmc.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-21 14:30:50 +0800
committerTony Lindgren <tony@atomide.com>2012-10-08 15:43:57 -0700
commit64de3a00a16bcdf940cbebb1b2dc05d7cc13fef5 (patch)
tree5d90dbfc3b0b45dcd2db39066b1c63d55f71128b /arch/arm/mach-omap2/hsmmc.c
parentOMAPDSS: fix return value check in create_dss_pdev() (diff)
downloadlinux-dev-64de3a00a16bcdf940cbebb1b2dc05d7cc13fef5.tar.xz
linux-dev-64de3a00a16bcdf940cbebb1b2dc05d7cc13fef5.zip
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,
dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);
od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
- if (!od) {
+ if (IS_ERR(od)) {
pr_err("Could not allocate od for %s\n", name);
goto put_pdev;
}