The low_dma value is always '1' in that branch, so the remaining 'if' statement can never be reached. Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> --- drivers/scsi/sg.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index dbe5b4b..652b934 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -890,14 +890,9 @@ static int max_sectors_bytes(struct request_queue *q) result = get_user(val, ip); if (result) return result; - if (val) { + if (val) sfp->low_dma = 1; - if ((0 == sfp->low_dma) && (0 == sg_res_in_use(sfp))) { - val = (int) sfp->reserve.bufflen; - sg_remove_scat(sfp, &sfp->reserve); - sg_build_reserve(sfp, val); - } - } else { + else { if (atomic_read(&sdp->detaching)) return -ENODEV; sfp->low_dma = sdp->device->host->unchecked_isa_dma; -- 1.8.5.6