Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qeth: fix handling of IPA return codes

Function that executes IPA commands returns the result code from the
IPA response block. If non-negative, it needs to be transformed into
errno-compatible code before returning to the caller.

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eugene Crosser and committed by
David S. Miller
c88394e7 c7258d86

+4 -6
+4 -6
drivers/s390/net/qeth_l2_main.c
··· 1808 1808 cmd->data.sbp.hdr.seq_no = 1; 1809 1809 rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_query_ports_cb, 1810 1810 (void *)&cbctl); 1811 - if (rc) 1811 + if (rc < 0) 1812 1812 return rc; 1813 - rc = qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS); 1814 - return rc; 1813 + return qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS); 1815 1814 } 1816 1815 EXPORT_SYMBOL_GPL(qeth_bridgeport_query_ports); 1817 1816 ··· 1873 1874 cmd->data.sbp.hdr.seq_no = 1; 1874 1875 rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_set_cb, 1875 1876 (void *)&cbctl); 1876 - if (rc) 1877 + if (rc < 0) 1877 1878 return rc; 1878 - rc = qeth_bridgeport_makerc(card, &cbctl, setcmd); 1879 - return rc; 1879 + return qeth_bridgeport_makerc(card, &cbctl, setcmd); 1880 1880 } 1881 1881 1882 1882 /**