]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/qrtr/qrtr.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284
[mirror_ubuntu-jammy-kernel.git] / net / qrtr / qrtr.c
index 801872a2e7aa54c22a022ccf275d34deb4a734b1..6c8b0f6d28f90f220a147be55b3d6d06cda7cc63 100644 (file)
@@ -1,15 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2015, Sony Mobile Communications Inc.
  * Copyright (c) 2013, The Linux Foundation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 #include <linux/module.h>
 #include <linux/netlink.h>
@@ -733,8 +725,8 @@ static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
        struct sock *sk = sock->sk;
        struct qrtr_node *node;
        struct sk_buff *skb;
-       u32 type = 0;
        size_t plen;
+       u32 type;
        int rc;
 
        if (msg->msg_flags & ~(MSG_DONTWAIT))
@@ -809,9 +801,9 @@ static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
 
                /* control messages already require the type as 'command' */
                skb_copy_bits(skb, 0, &qrtr_type, 4);
-               type = le32_to_cpu(qrtr_type);
        }
 
+       type = le32_to_cpu(qrtr_type);
        rc = enqueue_fn(node, skb, type, &ipc->us, addr);
        if (rc >= 0)
                rc = len;