From: Bin Meng Date: Sat, 17 Jun 2017 13:36:00 +0000 (-0700) Subject: cmd: scsi: Fix null pointer dereference in 'scsi reset' X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=db13a768a07b31b4955db934f3d55d2c77335bcc;p=u-boot.git 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 Reviewed-by: Simon Glass --- diff --git a/cmd/scsi.c b/cmd/scsi.c index 570971891e..8e36de107e 100644 --- a/cmd/scsi.c +++ b/cmd/scsi.c @@ -36,7 +36,9 @@ static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) case 2: if (strncmp(argv[1], "res", 3) == 0) { printf("\nReset SCSI\n"); +#ifndef CONFIG_DM_SCSI scsi_bus_reset(NULL); +#endif ret = scsi_scan(true); if (ret) return CMD_RET_FAILURE;