linux/drivers/scsi/fcoe
Harshit Mogalapalli 567a1e852e scsi: fcoe: Fix unsigned comparison with zero in store_ctlr_mode()
ctlr->mode is of unsigned type, it is never less than zero.

Fix this by using an extra variable called 'res', to store return value
from sysfs_match_string() and assign that to ctlr->mode on the success
path.

Fixes: edc22a7c86 ("scsi: fcoe: Use sysfs_match_string() over fcoe_parse_mode()")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20240102085245.600570-1-harshit.m.mogalapalli@oracle.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-01-11 21:26:26 -05:00
..
fcoe_ctlr.c scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock 2023-08-21 17:13:56 -04:00
fcoe_sysfs.c scsi: fcoe: Fix unsigned comparison with zero in store_ctlr_mode() 2024-01-11 21:26:26 -05:00
fcoe_transport.c scsi: libfcoe: Replace all non-returning strlcpy() with strscpy() 2023-05-31 18:00:06 -04:00
fcoe.c scsi: fcoe: Declare SCSI host template const 2023-03-24 19:19:22 -04:00
fcoe.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
libfcoe.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00