diff options
author | Alan <gnomes@lxorguk.ukuu.org.uk> | 2013-12-03 11:11:04 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-12-19 23:56:28 -0500 |
commit | 603f202e9eb083671f35f07cfe6be3e062c7ee31 (patch) | |
tree | 06ee6fdf4e1ad63f745375349531cf94c695edd5 /drivers/scsi | |
parent | 769989a4a09d7c825e182cf60604c06d8f2f70e4 (diff) |
[SCSI] mac_scsi: Fix crash on out of memory
Missing check on scsi_register
Signed-off-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/mac_scsi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index 858075723c87..f5cdc68cd5b6 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c | |||
@@ -260,6 +260,8 @@ int __init macscsi_detect(struct scsi_host_template * tpnt) | |||
260 | /* Once we support multiple 5380s (e.g. DuoDock) we'll do | 260 | /* Once we support multiple 5380s (e.g. DuoDock) we'll do |
261 | something different here */ | 261 | something different here */ |
262 | instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); | 262 | instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); |
263 | if (instance == NULL) | ||
264 | return 0; | ||
263 | 265 | ||
264 | if (macintosh_config->ident == MAC_MODEL_IIFX) { | 266 | if (macintosh_config->ident == MAC_MODEL_IIFX) { |
265 | mac_scsi_regp = via1+0x8000; | 267 | mac_scsi_regp = via1+0x8000; |