s390/qeth: fix error handling in adapter command callbacks
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Thu, 19 Apr 2018 10:52:06 +0000 (12:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:52:42 +0000 (14:52 +0100)
commit049fee28bba39dcf1bcec5fa56fa2a8eefd2e853
tree3fd8b8e0c8e808db662d3a55742774bcd701ac93
parent18addd960fe854df99727139040535e72addc6ea
s390/qeth: fix error handling in adapter command callbacks

[ Upstream commit 686c97ee29c886ee07d17987d0059874c5c3b5af ]

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

This matches an earlier fix for SETASSPARMS commands, see
commit ad3cbf613329 ("s390/qeth: fix error handling in checksum cmd callback").

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/net/qeth_core_main.c