]> git.baikalelectronics.ru Git - kernel.git/commit
8139cp: Add dma_mapping_error checking
authorNeil Horman <nhorman@tuxdriver.com>
Wed, 31 Jul 2013 13:03:56 +0000 (09:03 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Aug 2013 00:01:43 +0000 (17:01 -0700)
commit2c489c2a45bb93f2e281933dc7b9fd03872904d0
tree7ba15fd1f4406a9548a52d79a24a28fa13de767e
parentdcd6c02b9dad9b95e83a12adde951c5866fe7b8d
8139cp: Add dma_mapping_error checking

Self explanitory dma_mapping_error addition to the 8139 driver, based on this:
https://bugzilla.redhat.com/show_bug.cgi?id=947250

It showed several backtraces arising for dma_map_* usage without checking the
return code on the mapping.  Add the check and abort the rx/tx operation if its
failed.  Untested as I have no hardware and the reporter has wandered off, but
seems pretty straightforward.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/8139cp.c