Skip to content
Commit 567a1e85 authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Martin K. Petersen
Browse files

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: edc22a7c ("scsi: fcoe: Use sysfs_match_string() over fcoe_parse_mode()")
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20240102085245.600570-1-harshit.m.mogalapalli@oracle.com


Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 904fdd20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment