]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/remoteproc/qcom_tz_pil.c
remoteproc: qcom-tz: Fix uninitialzed variable bug
[karo-tx-linux.git] / 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;