fix potential return of uninitialized variable in scsi_scan (resend)
PATCH 1/1 fix potential return of uninitialized variable in scsi_scan (resend)
( The patch below was already send on March 9, 2006. )
( This is a resend, re-diff'ed against 2.6.16-rc6 )
The coverity checker found out that we potentially return sdev uninitialized. This should fix coverity #879
---
drivers/scsi/scsi_scan.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/scsi_scan.c +3 -1
@@ -1277,7 +1277,9 @@ struct scsi_device *__scsi_add_device(st hostdata);if (res !=SCSI_SCAN_LUN_PRESENT ) sdev =ERR_PTR (-ENODEV ); - } + }else + sdev =ERR_PTR (-EACCES ); +mutex_unlock (&shost->scan_mutex);scsi_target_reap (starget);put_device (&starget->dev);
James Bottomley
maintainerQuoted 6 lines · Jesper Juhl
( The patch below was already send on March 9, 2006. )
( This is a resend, re-diff'ed against 2.6.16-rc6 )The coverity checker found out that we potentially return sdev uninitialized. This should fix coverity #879
The fix for this is already in scsi-misc.
James
Quoted 10 lines · James Bottomley
Quoted 6 lines · Jesper Juhl
( The patch below was already send on March 9, 2006. )
( This is a resend, re-diff'ed against 2.6.16-rc6 )The coverity checker found out that we potentially return sdev uninitialized. This should fix coverity #879
The fix for this is already in scsi-misc.
Ok, I was unaware of that.
I'll try to remember to check that git tree in the future.
Thanks.
--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html