aic79xx: check for non-NULL scb in ahd_handle_nonpkt_busfree
authorHannes Reinecke <hare@suse.de>
Fri, 15 Jan 2010 12:07:34 +0000 (13:07 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:20:23 +0000 (13:20 -0700)
commitb92f44353fdc526df58a563a6c9279293eb607c7
tree3bbc8eeabc026fb0ea47fa02a7f1beb7138148e2
parentbde7aceab9887be15a5df51d3369ccc95cc2f241
aic79xx: check for non-NULL scb in ahd_handle_nonpkt_busfree

commit 534ef056db8a8fb6b9d50188d88ed5d1fbc66673 upstream.

When removing several devices aic79xx will occasionally Oops
in ahd_handle_nonpkt_busfree during rescan. Looking at the
code I found that we're indeed not checking if the scb in
question is NULL. So check for it before accessing it.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/aic7xxx/aic79xx_core.c