diff options
author | Tony Lindgren <tony@atomide.com> | 2017-10-30 18:01:39 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-10-30 18:01:39 +0100 |
commit | f0c96c6d40312b1a76cd36709dc3eb5948c1b97f (patch) | |
tree | 4fa56fb757907590876796af1bda472b6043988d /arch/arm/mach-omap2/omap_device.c | |
parent | bus: ti-sysc: Fix unbalanced pm_runtime_enable by adding remove (diff) | |
download | linux-f0c96c6d40312b1a76cd36709dc3eb5948c1b97f.tar.xz linux-f0c96c6d40312b1a76cd36709dc3eb5948c1b97f.zip |
ARM: OMAP2+: Fix smatch found issue for omap_device
The patch d85a2d61432a: "ARM: OMAP2+: Populate legacy resources for
dma and smartreflex" from Oct 10, 2017, leads to the following Smatch
complaint:
arch/arm/mach-omap2/omap_device.c:453 omap_device_copy_resources()
error: we previously assumed 'oh' could be null (see line 394)
Fixes: d85a2d61432a: ("ARM: OMAP2+: Populate legacy resources for dma
and smartreflex")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_device.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index d45cbfdb4be6..184acd95c216 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -391,10 +391,8 @@ omap_device_copy_resources(struct omap_hwmod *oh, const char *name; int error, irq = 0; - if (!oh || !oh->od || !oh->od->pdev) { - error = -EINVAL; - goto error; - } + if (!oh || !oh->od || !oh->od->pdev) + return -EINVAL; np = oh->od->pdev->dev.of_node; if (!np) { |