]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ipmi/powernv: Fix error return code in ipmi_powernv_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 18 Jan 2018 01:43:19 +0000 (01:43 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 17:44:25 +0000 (13:44 -0400)
BugLink: http://bugs.launchpad.net/bugs/1774063
[ Upstream commit e749d328b0b450aa78d562fa26a0cd8872325dd9 ]

Fix to return a negative error code from the request_irq() error
handling case instead of 0, as done elsewhere in this function.

Fixes: dce143c3381c ("ipmi/powernv: Convert to irq event interface")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/char/ipmi/ipmi_powernv.c

index 07fddbefefe482f4ce0c32fe1a92e7858d68c4d5..193baf31f778354884467177fc01fe26b193ddb8 100644 (file)
@@ -250,8 +250,9 @@ static int ipmi_powernv_probe(struct platform_device *pdev)
                ipmi->irq = opal_event_request(prop);
        }
 
-       if (request_irq(ipmi->irq, ipmi_opal_event, IRQ_TYPE_LEVEL_HIGH,
-                               "opal-ipmi", ipmi)) {
+       rc = request_irq(ipmi->irq, ipmi_opal_event, IRQ_TYPE_LEVEL_HIGH,
+                        "opal-ipmi", ipmi);
+       if (rc) {
                dev_warn(dev, "Unable to request irq\n");
                goto err_dispose;
        }