Skip to content

Commit

Permalink
[SCSI] mac_scsi: Fix crash on out of memory
Browse files Browse the repository at this point in the history
Missing check on scsi_register

Signed-off-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Alan authored and James Bottomley committed Dec 20, 2013
1 parent 769989a commit 603f202
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/mac_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ int __init macscsi_detect(struct scsi_host_template * tpnt)
/* Once we support multiple 5380s (e.g. DuoDock) we'll do
something different here */
instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
if (instance == NULL)
return 0;

if (macintosh_config->ident == MAC_MODEL_IIFX) {
mac_scsi_regp = via1+0x8000;
Expand Down

0 comments on commit 603f202

Please sign in to comment.