Skip to content
Snippets Groups Projects
Commit 4e27b9a5 authored by Jean-Jacques Hiblot's avatar Jean-Jacques Hiblot Committed by Simon Glass
Browse files

dm: scsi: fix divide-by-0 error in scsi_scan()


With DM_SCSI enabled, blk_create_devicef() is called with blkz = 0, leading
to a divide-by-0 exception.
scsi_detect_dev() can be used to get the required parameters (block size
and number of blocks) from the drive before calling blk_create_devicef().

Signed-off-by: default avatarJean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 1330a726
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment