Skip to content

Commit

Permalink
ARM: OMAP2+: Fix smatch found issue for omap_device
Browse files Browse the repository at this point in the history
The patch d85a2d6: "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: d85a2d6: ("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>
  • Loading branch information
Tony Lindgren committed Oct 30, 2017
1 parent 684be5a commit f0c96c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/arm/mach-omap2/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f0c96c6

Please sign in to comment.