mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 20:04:46 +00:00
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>
This commit is contained in:
parent
9c1390d4b9
commit
db13a768a0
1 changed files with 2 additions and 0 deletions
|
@ -36,7 +36,9 @@ static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
||||||
case 2:
|
case 2:
|
||||||
if (strncmp(argv[1], "res", 3) == 0) {
|
if (strncmp(argv[1], "res", 3) == 0) {
|
||||||
printf("\nReset SCSI\n");
|
printf("\nReset SCSI\n");
|
||||||
|
#ifndef CONFIG_DM_SCSI
|
||||||
scsi_bus_reset(NULL);
|
scsi_bus_reset(NULL);
|
||||||
|
#endif
|
||||||
ret = scsi_scan(true);
|
ret = scsi_scan(true);
|
||||||
if (ret)
|
if (ret)
|
||||||
return CMD_RET_FAILURE;
|
return CMD_RET_FAILURE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue