Commit cf183c17 authored by Thomas Fourier's avatar Thomas Fourier Committed by Madhavan Srinivasan
Browse files

powerpc: floppy: Add missing checks after DMA map

parent f5164797
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -144,9 +144,12 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
		bus_addr = 0;
	}

	if (!bus_addr)	/* need to map it */
	if (!bus_addr) {	/* need to map it */
		bus_addr = dma_map_single(&isa_bridge_pcidev->dev, addr, size,
					  dir);
		if (dma_mapping_error(&isa_bridge_pcidev->dev, bus_addr))
			return -ENOMEM;
	}

	/* remember this one as prev */
	prev_addr = addr;