Commit add2c24
scsi: sd: Fix scsi_mode_sense caller's sshdr use
The sshdr passed into scsi_execute_cmd is only initialized if
scsi_execute_cmd returns >= 0, and scsi_mode_sense will convert all non
good statuses like check conditions to -EIO. This has scsi_mode_sense
callers that were possibly accessing an uninitialized sshdrs to only
access it if we got -EIO.
Signed-off-by: Mike Christie <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Martin Wilck <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 0b149ce commit add2c24
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2890 | 2890 | | |
2891 | 2891 | | |
2892 | 2892 | | |
2893 | | - | |
| 2893 | + | |
2894 | 2894 | | |
2895 | 2895 | | |
2896 | 2896 | | |
| |||
2938 | 2938 | | |
2939 | 2939 | | |
2940 | 2940 | | |
2941 | | - | |
| 2941 | + | |
2942 | 2942 | | |
2943 | 2943 | | |
2944 | 2944 | | |
| |||
0 commit comments