diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-05-02 21:31:29 +0100 | 
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-05-02 21:31:29 +0100 | 
| commit | 33b9f582c5c1db515412cc7efff28f7d1779321f (patch) | |
| tree | 60ea1b403b41f651bc570f4c368ba82064880796 /arch/arm/mach-omap2/omap_device.c | |
| parent | 946342d03ec4e8367bba7bb99e7155e97f69058a (diff) | |
| parent | 008ca431822f39a023322b3598d8366faf46cfc1 (diff) | |
| download | olio-linux-3.10-33b9f582c5c1db515412cc7efff28f7d1779321f.tar.xz olio-linux-3.10-33b9f582c5c1db515412cc7efff28f7d1779321f.zip  | |
Merge branch 'cleanup' into for-linus
Conflicts:
	arch/arm/plat-omap/dmtimer.c
Diffstat (limited to 'arch/arm/mach-omap2/omap_device.c')
| -rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 13 | 
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 381be7ac0c1..eeea4fa28fb 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -131,7 +131,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev)  	int oh_cnt, i, ret = 0;  	oh_cnt = of_property_count_strings(node, "ti,hwmods"); -	if (!oh_cnt || IS_ERR_VALUE(oh_cnt)) { +	if (oh_cnt <= 0) {  		dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n");  		return -ENODEV;  	} @@ -815,20 +815,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;  }  |