Commit db13a768a07b31b4955db934f3d55d2c77335bcc

Authored by Bin Meng
Committed by Simon Glass
1 parent 9c1390d4b9

cmd: scsi: Fix null pointer dereference in 'scsi reset'

During 'scsi reset', scsi_bus_reset() is called with udevice pointed
to NULL, which causes exception. As a temporary fix, disable the call
for DM SCSI for now.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -36,7 +36,9 @@
36 36 case 2:
37 37 if (strncmp(argv[1], "res", 3) == 0) {
38 38 printf("\nReset SCSI\n");
  39 +#ifndef CONFIG_DM_SCSI
39 40 scsi_bus_reset(NULL);
  41 +#endif
40 42 ret = scsi_scan(true);
41 43 if (ret)
42 44 return CMD_RET_FAILURE;