[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1464112523-3701-5-git-send-email-kamal@canonical.com>
Date: Tue, 24 May 2016 10:54:34 -0700
From: Kamal Mostafa <kamal@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: Jack Pham <jackp@...eaurora.org>, Mark Brown <broonie@...nel.org>,
Kamal Mostafa <kamal@...onical.com>
Subject: [PATCH 4.2.y-ckt 04/53] regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
4.2.8-ckt11 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: Jack Pham <jackp@...eaurora.org>
commit dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 upstream.
Specifically for the case of reads that use the Extended Register
Read Long command, a multi-byte read operation is broken up into
8-byte chunks. However the call to spmi_ext_register_readl() is
incorrectly passing 'val_size', which if greater than 8 will
always fail. The argument should instead be 'len'.
Fixes: c9afbb05a9ff ("regmap: spmi: support base and extended register spaces")
Signed-off-by: Jack Pham <jackp@...eaurora.org>
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Kamal Mostafa <kamal@...onical.com>
---
drivers/base/regmap/regmap-spmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap-spmi.c b/drivers/base/regmap/regmap-spmi.c
index d7026dc..b394aae 100644
--- a/drivers/base/regmap/regmap-spmi.c
+++ b/drivers/base/regmap/regmap-spmi.c
@@ -153,7 +153,7 @@ static int regmap_spmi_ext_read(void *context,
while (val_size) {
len = min_t(size_t, val_size, 8);
- err = spmi_ext_register_readl(context, addr, val, val_size);
+ err = spmi_ext_register_readl(context, addr, val, len);
if (err)
goto err_out;
--
2.7.4
Powered by blists - more mailing lists