projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
769989a
)
[SCSI] mac_scsi: Fix crash on out of memory
author
Alan
<gnomes@lxorguk.ukuu.org.uk>
Tue, 3 Dec 2013 16:11:04 +0000
(16:11 +0000)
committer
James Bottomley
<JBottomley@Parallels.com>
Fri, 20 Dec 2013 04:56:28 +0000
(20:56 -0800)
Missing check on scsi_register
Signed-off-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/mac_scsi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/mac_scsi.c
b/drivers/scsi/mac_scsi.c
index 858075723c87fc2e010f582385126529ac168fff..f5cdc68cd5b6f194f9f1f5e573e1c7747a70bb48 100644
(file)
--- 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)
/* 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;