]> err.no Git - linux-2.6/commit
[PATCH] iseries_veth: Only call dma_unmap_single() if dma_map_single() succeeded
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 1 Sep 2005 01:29:07 +0000 (11:29 +1000)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 1 Sep 2005 02:39:43 +0000 (22:39 -0400)
commitcbf9074cc30ca0eee19c9bd7304faf9f1beb1e76
treef3d0133df8c9a46135148e34b0a553849153c04f
parentb08bd5c0a3110f143faeef9cd057d9d8ff2f0714
[PATCH] iseries_veth: Only call dma_unmap_single() if dma_map_single() succeeded

The iseries_veth driver unconditionally calls dma_unmap_single() even
when the corresponding dma_map_single() may have failed.

Rework the code a bit to keep the return value from dma_unmap_single()
around, and then check if it's a dma_mapping_error() before we do
the dma_unmap_single().

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/iseries_veth.c