OSDN Git Service

soc: qcom: subsystem_notif_virt: Fix error condition check
authorAnant Goel <anantg@codeaurora.org>
Tue, 4 Sep 2018 21:42:20 +0000 (14:42 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 5 Sep 2018 17:10:32 +0000 (10:10 -0700)
An error check casts an integer to a pointer. Fix the error
check so that the integer is not casted to a pointer.

Change-Id: Ib15634745cc2243e4fe54557d6670956d8349e93
Signed-off-by: Anant Goel <anantg@codeaurora.org>
drivers/soc/qcom/subsystem_notif_virt.c

index fb6697b..f8ce53c 100644 (file)
@@ -176,7 +176,7 @@ static int subsys_notif_virt_probe(struct platform_device *pdev)
                case VIRTUAL:
                        subsystem->ssr_irq =
                                of_irq_get_byname(child, "state-irq");
-                       if (IS_ERR_OR_NULL(subsystem->ssr_irq)) {
+                       if (subsystem->ssr_irq < 0) {
                                dev_err(&pdev->dev, "Could not find IRQ\n");
                                ret = -EINVAL;
                                goto err;