From: Ursula Braun Date: Mon, 16 Dec 2013 08:44:51 +0000 (+0100) Subject: netiucv: improve state checking in conn_action_txdone X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d239ae339e0740d2405f4d8a4d482dbe7b001c69;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git netiucv: improve state checking in conn_action_txdone state checking in conn_action_txdone() is inconsistent. This patch makes it consistent and issues a trace message if an unexpected state is detected for the netiucv device. Signed-off-by: Ursula Braun Signed-off-by: Frank Blaschka Signed-off-by: David S. Miller --- diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 9b333fcf1a4c..ce16d1bdb20a 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c @@ -739,8 +739,12 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg) IUCV_DBF_TEXT(trace, 4, __func__); - if (conn && conn->netdev) - privptr = netdev_priv(conn->netdev); + if (!conn || !conn->netdev) { + IUCV_DBF_TEXT(data, 2, + "Send confirmation for unlinked connection\n"); + return; + } + privptr = netdev_priv(conn->netdev); conn->prof.tx_pending--; if (single_flag) { if ((skb = skb_dequeue(&conn->commit_queue))) {