Re: [PATCH 1/2] slimbus: qcom-ctrl: fix a NULL test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 09/01/18 09:26, Dan Carpenter wrote:
"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@xxxxxxxxxx>
---
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;


Already fixed at:
https://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg1575799.html
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux