[PATCH] Fix a bug in scsi_get_command
authorMatthew Dobson <colpatch@us.ibm.com>
Tue, 22 Nov 2005 05:32:29 +0000 (21:32 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 22 Nov 2005 17:13:44 +0000 (09:13 -0800)
commit79e448bf2d71d52d28c99be4faff9cc51928f90b
treeb3c8255d2384e7e8d529dc368b42563a0a1f6e0b
parente738cf6d03786486b7e1adbaed1c5c4e14d23626
[PATCH] Fix a bug in scsi_get_command

scsi_get_command() attempts to write into a structure that may not have
been successfully allocated.  Move this write inside the if statement that
ensures we won't panic the kernel with a NULL pointer dereference.

Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/scsi/scsi.c