[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180109092616.mfha2rs56oaxfjaz@mwanda>
Date: Tue, 9 Jan 2018 12:26:16 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Sagar Dharia <sdharia@...eaurora.org>
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH 1/2] slimbus: qcom-ctrl: fix a NULL test
"retries" ends when it is set to -1 and not 0 so that part of the test
is wrong. This bug would lead to a NULL dereference a couple lines
later.
Fixes: afbdcc7c384b ("slimbus: Add messaging APIs to slimbus framework")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
Should Greg be added to the MAINTAINERS file for this driver?
diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index fb1a5e0eb8dd..3ab59209cbdc 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -345,7 +345,7 @@ static int qcom_xfer_msg(struct slim_controller *sctrl,
}
}
- if (!retries && !pbuf)
+ if (!pbuf)
return -ENOMEM;
puc = (u8 *)pbuf;
Powered by blists - more mailing lists