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

Commit 0d826c39 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: rtl8187se: Fix failure to check pci_map_single()



Beginning with kernel 3.8, the DMA mapping routines issue a warning
for the first call to pci_map_single() that is not checked with a
pci_dma_mapping_error() call.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efe57d59
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -937,7 +937,8 @@ short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)

		dma_tmp = pci_map_single(pdev, buf, bufsize * sizeof(u8),
					 PCI_DMA_FROMDEVICE);

		if (pci_dma_mapping_error(pdev, dma_tmp))
			return -1;
		if (-1 == buffer_add(&(priv->rxbuffer), buf, dma_tmp,
			   &(priv->rxbufferhead))) {
			DMESGE("Unable to allocate mem RX buf");