8139cp: Add dma_mapping_error checking
authorNeil Horman <nhorman@tuxdriver.com>
Wed, 31 Jul 2013 13:03:56 +0000 (09:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Aug 2013 22:38:45 +0000 (15:38 -0700)
commit249b3ecb840cdddd94103fb68d91b0dbb650064f
treeab22a66aeb53c5eaf28aeed9454055330489e7a8
parentd5c50d2b4a7110dfec5204b755a0a7f031fe518f
8139cp: Add dma_mapping_error checking

[ Upstream commit cf3c4c03060b688cbc389ebc5065ebcce5653e96 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/realtek/8139cp.c