]> git.baikalelectronics.ru Git - kernel.git/commit
rtl818x: check for pci_map_single() success when initializing RX ring
authorandrea merello <andrea.merello@gmail.com>
Sat, 22 Feb 2014 16:57:23 +0000 (17:57 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Feb 2014 19:08:27 +0000 (14:08 -0500)
commite0062649e88e9e556ef91c4a5b56aba51936f096
tree82ee8cc494173ae21214d09ca28f0c880c84e2c8
parent386277d4041c2cda0a68c7cb2a7e7fb5498aa1f4
rtl818x: check for pci_map_single() success when initializing RX ring

During initialization a number of RX skbs are allocated and mapped
for DMA.
Currently if pci_map_single() fails, it will result in passing to the
HW a wrong DMA address (to write to!).

This patch adds check for this condition and eventually causes the
driver not to initialize, avoiding at least dangerous DMAs.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl818x/rtl8180/dev.c