Skip to content

Commit 8092782

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
The "retval" variable needs to be signed for the error handling to work. Link: https://lore.kernel.org/r/YLjMEAFNxOas1mIp@mwanda Fixes: 7e26e3e ("scsi: scsi_dh_alua: Check for negative result value") Reviewed-by: Martin Wilck <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 8b1afb7 commit 8092782

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/device_handler/scsi_dh_alua.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
518518
int len, k, off, bufflen = ALUA_RTPG_SIZE;
519519
int group_id_old, state_old, pref_old, valid_states_old;
520520
unsigned char *desc, *buff;
521-
unsigned err, retval;
521+
unsigned err;
522+
int retval;
522523
unsigned int tpg_desc_tbl_off;
523524
unsigned char orig_transition_tmo;
524525
unsigned long flags;

0 commit comments

Comments
 (0)