From 99b6ba1f0732c544bc4e20b861c33305c7b312bb Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 24 Feb 2013 10:56:59 +0000 Subject: [PATCH] --- yaml --- r: 372143 b: refs/heads/master c: 857835c6d57aef101ac335a6da2149b54e7e0512 h: refs/heads/master i: 372141: 1d7c481f490222fb25206eb9c0398e12a935a569 372139: 145d79af2d9bd27575abe6c104d4e575e279952a 372135: eb51154dbe643f2976c3bdb2e1b41059a9ac2c67 372127: 4bfaccde0a0b7c785af10ab57a584b150a264a19 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/omap_device.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 393cb3ae1023..d6c0448961aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62f0f39b4aa2dce08f08797089e60d945448ca2b +refs/heads/master: 857835c6d57aef101ac335a6da2149b54e7e0512 diff --git a/trunk/arch/arm/mach-omap2/omap_device.c b/trunk/arch/arm/mach-omap2/omap_device.c index e065daa537c0..1bc16cdafdd6 100644 --- a/trunk/arch/arm/mach-omap2/omap_device.c +++ b/trunk/arch/arm/mach-omap2/omap_device.c @@ -1157,20 +1157,17 @@ struct device *omap_device_get_by_hwmod_name(const char *oh_name) } oh = omap_hwmod_lookup(oh_name); - if (IS_ERR_OR_NULL(oh)) { + if (!oh) { WARN(1, "%s: no hwmod for %s\n", __func__, oh_name); - return ERR_PTR(oh ? PTR_ERR(oh) : -ENODEV); + return ERR_PTR(-ENODEV); } - if (IS_ERR_OR_NULL(oh->od)) { + if (!oh->od) { WARN(1, "%s: no omap_device for %s\n", __func__, oh_name); - return ERR_PTR(oh->od ? PTR_ERR(oh->od) : -ENODEV); + return ERR_PTR(-ENODEV); } - if (IS_ERR_OR_NULL(oh->od->pdev)) - return ERR_PTR(oh->od->pdev ? PTR_ERR(oh->od->pdev) : -ENODEV); - return &oh->od->pdev->dev; } EXPORT_SYMBOL(omap_device_get_by_hwmod_name);