From: Greg Kroah-Hartman Date: Fri, 6 Apr 2018 08:24:54 +0000 (+0200) Subject: net: cavium: liquidio: fix up "Avoid dma_unmap_single on uninitialized ndata" X-Git-Tag: v4.4.127~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cadfea22baa34575df96467acb7953104df7ba2;p=profile%2Fcommon%2Fplatform%2Fkernel%2Flinux-artik7.git 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 Cc: Florian Fainelli Cc: David S. Miller Cc: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index cc17256..5074757 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -2823,7 +2823,7 @@ static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev) if (!g) { netif_info(lio, tx_err, lio->netdev, "Transmit scatter gather: glist null!\n"); - goto lio_xmit_dma_failed; + goto lio_xmit_failed; } cmdsetup.s.gather = 1;