net: dsa: add error handling for pskb_trim_rcsum
authorZhouyang Jia <jiazhouyang09@gmail.com>
Mon, 11 Jun 2018 05:26:35 +0000 (13:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jun 2018 00:06:28 +0000 (08:06 +0800)
commit73c0eab8d2158ef08120e979ce96f4fd80bc4488
tree35b0fc3151db0ce990c4c39ed533d7062c44f284
parent6bcc27abfa62161ef7dae18dfe1bce70865b2aa8
net: dsa: add error handling for pskb_trim_rcsum

[ Upstream commit 349b71d6f427ff8211adf50839dbbff3f27c1805 ]

When pskb_trim_rcsum fails, the lack of error-handling code may
cause unexpected results.

This patch adds error-handling code after calling pskb_trim_rcsum.

Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/dsa/tag_trailer.c