s390/qeth: fix error handling in checksum cmd callback
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Wed, 20 Dec 2017 17:07:18 +0000 (18:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2018 19:31:11 +0000 (20:31 +0100)
commitf38ffe325b209f367c003bab291cf7e96cd1a6d9
tree6447ae3da66dba73f91c6dc81a83fdcca30e4d0a
parentff1ff3815c2483ac19bd6f926a535dd4cea27e2e
s390/qeth: fix error handling in checksum cmd callback

[ Upstream commit ad3cbf61332914711e5f506972b1dc9af8d62146 ]

Make sure to check both return code fields before processing the
response. Otherwise we risk operating on invalid data.

Fixes: c9475369bd2b ("s390/qeth: rework RX/TX checksum offload")
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/net/qeth_core_main.c