Tong Zhang 4db09593af scsi: myrs: Fix crash in error case
In myrs_detect(), cs->disable_intr is NULL when privdata->hw_init() fails
with non-zero. In this case, myrs_cleanup(cs) will call a NULL ptr and
crash the kernel.

[    1.105606] myrs 0000:00:03.0: Unknown Initialization Error 5A
[    1.105872] myrs 0000:00:03.0: Failed to initialize Controller
[    1.106082] BUG: kernel NULL pointer dereference, address: 0000000000000000
[    1.110774] Call Trace:
[    1.110950]  myrs_cleanup+0xe4/0x150 [myrs]
[    1.111135]  myrs_probe.cold+0x91/0x56a [myrs]
[    1.111302]  ? DAC960_GEM_intr_handler+0x1f0/0x1f0 [myrs]
[    1.111500]  local_pci_probe+0x48/0x90

Link: https://lore.kernel.org/r/20220123225717.1069538-1-ztong0001@gmail.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-01-25 00:09:41 -05:00
..
2020-03-11 23:07:59 -04:00
2021-11-05 08:42:02 -07:00
2022-01-23 06:20:44 +02:00
2022-01-14 14:37:34 +01:00
2022-01-22 10:24:02 +02:00
2021-01-22 21:14:08 -05:00
2021-01-22 21:14:07 -05:00
2021-01-22 21:14:08 -05:00
2022-01-14 14:37:34 +01:00
2020-03-11 23:07:59 -04:00
2020-09-02 22:49:06 -04:00
2021-10-16 21:45:56 -04:00
2021-04-13 00:20:48 -04:00
2020-12-07 20:24:09 -05:00
2021-10-16 21:29:15 -04:00
2022-01-25 00:09:41 -05:00
2020-12-07 20:24:09 -05:00
2021-05-21 16:59:33 -04:00
2021-03-24 23:03:43 -04:00
2022-01-14 14:37:34 +01:00
2022-01-22 10:24:02 +02:00
2022-01-22 08:33:37 +02:00
2022-01-14 14:37:34 +01:00
2022-01-22 10:24:02 +02:00
2021-12-22 23:41:13 -05:00
2022-01-14 14:37:34 +01:00
2020-02-24 15:01:57 -05:00
2021-08-23 12:54:30 -06:00
2021-04-13 00:20:48 -04:00