Skip to content

Commit b33aa0d

Browse files
Dan Carpentergregkh
authored andcommitted
scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
commit 8092782 upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e09c9b5 commit b33aa0d

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
@@ -508,7 +508,8 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
508508
struct alua_port_group *tmp_pg;
509509
int len, k, off, bufflen = ALUA_RTPG_SIZE;
510510
unsigned char *desc, *buff;
511-
unsigned err, retval;
511+
unsigned err;
512+
int retval;
512513
unsigned int tpg_desc_tbl_off;
513514
unsigned char orig_transition_tmo;
514515
unsigned long flags;

0 commit comments

Comments
 (0)