]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
remoteproc: qcom-tz: Fix uninitialzed variable bug
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 5 Jan 2017 13:20:36 +0000 (14:20 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 7 Mar 2017 11:40:58 +0000 (12:40 +0100)
commit 691849c2ffa1 ("Move to new qcom_smem_get() api") left over a
check of a now uninitialized variable.
Remove the variable and do the check in the hopefully intended
manner.

drivers/remoteproc/qcom_tz_pil.c

index 6de08442f57f7089a63b544d4379374239183020..8fa9f87ec16951ac0c296ffc53da099e6f854f4a 100644 (file)
@@ -395,7 +395,6 @@ static irqreturn_t qproc_fatal_interrupt(int irq, void *dev)
        struct qproc *qproc = dev;
        size_t len;
        char *msg;
-       int ret;
 
        msg = qcom_smem_get(-1, qproc->crash_reason, &len);
        if (IS_ERR(msg) && len > 0 && msg[0])
@@ -403,7 +402,7 @@ static irqreturn_t qproc_fatal_interrupt(int irq, void *dev)
 
        rproc_report_crash(qproc->rproc, RPROC_FATAL_ERROR);
 
-       if (!ret)
+       if (IS_ERR(msg))
                msg[0] = '\0';
 
        return IRQ_HANDLED;