Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[cascardo/linux.git] / net / iucv / af_iucv.c
index 7a95fa4..a089b6b 100644 (file)
@@ -1103,7 +1103,6 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
                default:
                        err = -EINVAL;
                        goto out;
-                       break;
                }
        }
 
@@ -1543,7 +1542,8 @@ static int iucv_sock_shutdown(struct socket *sock, int how)
 
        sk->sk_shutdown |= how;
        if (how == RCV_SHUTDOWN || how == SHUTDOWN_MASK) {
-               if (iucv->transport == AF_IUCV_TRANS_IUCV) {
+               if ((iucv->transport == AF_IUCV_TRANS_IUCV) &&
+                   iucv->path) {
                        err = pr_iucv->path_quiesce(iucv->path, NULL);
                        if (err)
                                err = -ENOTCONN;