Commit f0c96c6d authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP2+: Fix smatch found issue for omap_device



The patch d85a2d61: "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: d85a2d61: ("ARM: OMAP2+: Populate legacy resources for dma
and smartreflex")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 684be5a4
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -391,10 +391,8 @@ omap_device_copy_resources(struct omap_hwmod *oh,
	const char *name;
	const char *name;
	int error, irq = 0;
	int error, irq = 0;


	if (!oh || !oh->od || !oh->od->pdev) {
	if (!oh || !oh->od || !oh->od->pdev)
		error = -EINVAL;
		return -EINVAL;
		goto error;
	}


	np = oh->od->pdev->dev.of_node;
	np = oh->od->pdev->dev.of_node;
	if (!np) {
	if (!np) {