scsi: mac_scsi: check scsi_register() result
Subsystems (3)
PATCH 1/1 scsi: mac_scsi: check scsi_register() result
scsi_register() may fail, if so return from detect() with negative result.
Signed-off-by Kulikov Vasiliy <[email protected]>
--- drivers/scsi/mac_scsi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/scsi/mac_scsi.c +3 -0
@@ -268,6 +268,9 @@ int 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 NDEBUG default_instance = instance;#endif
Signature · 1 line
1.7.0.4