mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 08:48:48 +00:00
[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>
This commit is contained in:
parent
769989a4a0
commit
603f202e9e
@ -260,6 +260,8 @@ int __init macscsi_detect(struct scsi_host_template * tpnt)
|
|||||||
/* Once we support multiple 5380s (e.g. DuoDock) we'll do
|
/* Once we support multiple 5380s (e.g. DuoDock) we'll do
|
||||||
something different here */
|
something different here */
|
||||||
instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
|
instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
|
||||||
|
if (instance == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (macintosh_config->ident == MAC_MODEL_IIFX) {
|
if (macintosh_config->ident == MAC_MODEL_IIFX) {
|
||||||
mac_scsi_regp = via1+0x8000;
|
mac_scsi_regp = via1+0x8000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user