omap2/3/4: mailbox: remove compiler warning
authorSuman Anna <s-anna@ti.com>
Tue, 26 Jan 2010 00:27:21 +0000 (18:27 -0600)
committerTony Lindgren <tony@atomide.com>
Thu, 11 Mar 2010 22:50:00 +0000 (14:50 -0800)
Remove a compiler warning in device-specific
mailbox module.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/mailbox.c

index 52a981cb8fdd897e43a975050def3cae2150a1d9..318f3638653c1f97ce106d20ce4d2dd314d85c8d 100644 (file)
@@ -430,19 +430,19 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
                if (unlikely(!res)) {
                        dev_err(&pdev->dev, "invalid irq resource\n");
                        ret = -ENODEV;
-                       goto err_iva1;
+                       omap_mbox_unregister(&mbox_dsp_info);
+                       goto err_dsp;
                }
                mbox_iva_info.irq = res->start;
                ret = omap_mbox_register(&pdev->dev, &mbox_iva_info);
-               if (ret)
-                       goto err_iva1;
+               if (ret) {
+                       omap_mbox_unregister(&mbox_dsp_info);
+                       goto err_dsp;
+               }
        }
 #endif
        return 0;
 
-err_iva1:
-       omap_mbox_unregister(&mbox_dsp_info);
-
 err_dsp:
        iounmap(mbox_base);
        return ret;