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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Apr 2018 18:42:31 +0000 (14:42 -0400)
commit686c97ee29c886ee07d17987d0059874c5c3b5af
treeeac105a5a1532c4a3dded4e9143eb4d973de5df8
parent83beed7b2b26f232d782127792dd0cd4362fdc41
s390/qeth: fix error handling in adapter command callbacks

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>
drivers/s390/net/qeth_core_main.c