From 3d7d6fe85f9433458b919f1cef63491ce49530b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Thu, 5 Jan 2017 14:20:36 +0100 Subject: [PATCH] remoteproc: qcom-tz: Fix uninitialzed variable bug 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_tz_pil.c b/drivers/remoteproc/qcom_tz_pil.c index 6de08442f57f..8fa9f87ec169 100644 --- a/drivers/remoteproc/qcom_tz_pil.c +++ b/drivers/remoteproc/qcom_tz_pil.c @@ -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; -- 2.39.2