Searched hist:"9 c6603e1" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/target/ |
H A D | target_core_fabric_configfs.c | 9c6603e1 Thu Nov 18 02:49:00 CST 2021 Dan Carpenter <dan.carpenter@oracle.com> scsi: target: configfs: Delete unnecessary checks for NULL
The "item" pointer is always going to be valid pointer and does not need to be checked.
But if "item" were NULL then item_to_lun() would not return a NULL, but instead, the container_of() pointer math would return a value in the error pointer range. This confuses static checkers since it looks like a NULL vs IS_ERR() bug.
Delete the bogus checks.
Link: https://lore.kernel.org/r/20211118084900.GA24550@kili Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|