[PATCH][i3c-next] i3c: fix incorrect update to max_read_ds

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

 



From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Currently max_read_ds is being updated twice, which is incorrect.
The second assignment should be to max_write_ds instead. Fix this.

Detected by CoverityScan, CID#1475379 ("Unused value")

Fixes: 50cacdabeae1 ("i3c: Add core I3C infrastructure")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
 drivers/i3c/master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 68d6553dbd75..0ea7bb045fad 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1093,7 +1093,7 @@ static int i3c_master_getmxds_locked(struct i3c_master_controller *master,
 	}
 
 	info->max_read_ds = getmaxds->maxrd;
-	info->max_read_ds = getmaxds->maxwr;
+	info->max_write_ds = getmaxds->maxwr;
 	if (dest.payload.len == 5)
 		info->max_read_turnaround = getmaxds->maxrdturn[0] |
 					    ((u32)getmaxds->maxrdturn[1] << 8) |
-- 
2.19.1




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux