scsi: target: configfs: Delete unnecessary checks for NULL
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 18 Nov 2021 08:49:00 +0000 (11:49 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Nov 2021 04:07:02 +0000 (23:07 -0500)
commit9c6603e1faf880bada541e9cce6514d2f3248da0
treeecc518683d599964a793675524ce3252eddbc9d2
parente2a49a95b571d9d208f28a03d63353374e724f13
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>
drivers/target/target_core_fabric_configfs.c