WSL2-Linux-Kernel/drivers/i3c
Tom Rix 13462ba181 i3c: master: dw: check return of dw_i3c_master_get_free_pos()
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
2022-01-13 02:05:50 +01:00
..
master i3c: master: dw: check return of dw_i3c_master_get_free_pos() 2022-01-13 02:05:50 +01:00
Kconfig i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
Makefile i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
device.c i3c: Handle drivers without probe or remove callback 2021-02-02 00:16:57 +01:00
internals.h i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
master.c i3c: fix incorrect address slot lookup on 64-bit 2021-12-10 15:54:46 +01:00