OSDN Git Service

net: cavium: liquidio: fix up "Avoid dma_unmap_single on uninitialized ndata"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Apr 2018 08:24:54 +0000 (10:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 09:52:02 +0000 (11:52 +0200)
commit8cadfea22baa34575df96467acb7953104df7ba2
tree577e128ab13fe835a3d505e447513e3f3604b6d6
parent20075a85454c2eb0c76f12e878b210b03fe43454
net: cavium: liquidio: fix up "Avoid dma_unmap_single on uninitialized ndata"

This fixes up commit 1d1cb762524f05cfb37994e0d36b7b4b5e957134 which was
commit 8e6ce7ebeb34f0992f56de078c3744fb383657fa upstream.

Ben writes:
This goto should not have been changed, as no DMA mapping has been
attempted at this point in the function.

This seems to have been fixed upstream by commit 6a885b60dad2 "liquidio:
Introduce new octeon2/3 header".  I leave it to you to work out how it
should be fixed in 4.4-stable.

Fix this up by hand, as the referenced patch isn't worthy of being
backported.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cavium/liquidio/lio_main.c