Merge tag 'for-linus-20190524' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / net / nfc / af_nfc.c
index 256f3c5..4a9e720 100644 (file)
@@ -1,27 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2011 Instituto Nokia de Tecnologia
  *
  * Authors:
  *    Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
  *    Lauro Ramos Venancio <lauro.venancio@openbossa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <linux/nfc.h>
 #include <linux/module.h>
-#include <linux/nospec.h>
 
 #include "nfc.h"
 
@@ -38,7 +25,6 @@ static int nfc_sock_create(struct net *net, struct socket *sock, int proto,
 
        if (proto < 0 || proto >= NFC_SOCKPROTO_MAX)
                return -EINVAL;
-       proto = array_index_nospec(proto, NFC_SOCKPROTO_MAX);
 
        read_lock(&proto_tab_lock);
        if (proto_tab[proto] && try_module_get(proto_tab[proto]->owner)) {