linux/drivers/i3c/master
Tom Rix 8654464086 i3c: master: dw: check return of dw_i3c_master_get_free_pos()
[ Upstream commit 13462ba181 ]

Clang static analysis reports this problem
dw-i3c-master.c:799:9: warning: The result of the left shift is
  undefined because the left operand is negative
                      COMMAND_PORT_DEV_INDEX(pos) |
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~

pos can be negative because dw_i3c_master_get_free_pos() can return an
error.  So check for an error.

Fixes: 1dd728f5d4 ("i3c: master: Add driver for Synopsys DesignWare IP")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220108150948.3988790-1-trix@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-03-08 19:12:37 +01:00
..
mipi-i3c-hci i3c/master/mipi-i3c-hci: Fix a potentially infinite loop in 'hci_dat_v1_get_index()' 2022-03-08 19:12:35 +01:00
dw-i3c-master.c i3c: master: dw: check return of dw_i3c_master_get_free_pos() 2022-03-08 19:12:37 +01:00
i3c-master-cdns.c i3c: master: cdns: Fix fall-through warning for Clang 2021-06-29 08:37:04 -05:00
Kconfig i3c: master: svc: Add Silvaco I3C master driver 2021-02-06 00:43:29 +01:00
Makefile i3c: master: svc: Add Silvaco I3C master driver 2021-02-06 00:43:29 +01:00
svc-i3c-master.c i3c: master: svc: fix doc warning in svc-i3c-master.c 2021-06-09 02:02:45 +02:00