Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7ef1248 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

icside: icside_dma_setup() fixes



Check for ide_build_sglist() return value and re-map sg table if necessary.

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 39375853
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -326,6 +326,10 @@ static int icside_dma_setup(ide_drive_t *drive)
	BUG_ON(dma_channel_active(ec->dma));

	hwif->sg_nents = ide_build_sglist(drive, rq);
	if (hwif->sg_nents == 0) {
		ide_map_sg(drive, rq);
		return 1;
	}

	/*
	 * Ensure that we have the right interrupt routed.