diff options
author | Tom Rix <trix@redhat.com> | 2020-06-27 06:32:42 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-29 10:16:45 +0200 |
commit | 8fba1b38af76dec291d1519055d1efe14bc095d3 (patch) | |
tree | 98746f6374d947b19ac30d46aa48b79964e3d4f2 /arch/xtensa | |
parent | 95234da3124046837bb9d622eb426969b6fbe73c (diff) | |
download | linux-stable-8fba1b38af76dec291d1519055d1efe14bc095d3.tar.gz linux-stable-8fba1b38af76dec291d1519055d1efe14bc095d3.tar.bz2 linux-stable-8fba1b38af76dec291d1519055d1efe14bc095d3.zip |
scsi: scsi_transport_spi: Fix function pointer check
[ Upstream commit 5aee52c44d9170591df65fafa1cd408acc1225ce ]
clang static analysis flags several null function pointer problems.
drivers/scsi/scsi_transport_spi.c:374:1: warning: Called function pointer is null (null dereference) [core.CallAndMessage]
spi_transport_max_attr(offset, "%d\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewing the store_spi_store_max macro
if (i->f->set_##field)
return -EINVAL;
should be
if (!i->f->set_##field)
return -EINVAL;
Link: https://lore.kernel.org/r/20200627133242.21618-1-trix@redhat.com
Reviewed-by: James Bottomley <jejb@linux.ibm.com>
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/xtensa')
0 files changed, 0 insertions, 0 deletions