From patchwork Wed Mar 22 19:20:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9639911 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 31286601E9 for ; Wed, 22 Mar 2017 19:21:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AEBE23B23 for ; Wed, 22 Mar 2017 19:21:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F210528460; Wed, 22 Mar 2017 19:21:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8387323B23 for ; Wed, 22 Mar 2017 19:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934830AbdCVTVS (ORCPT ); Wed, 22 Mar 2017 15:21:18 -0400 Received: from mga11.intel.com ([192.55.52.93]:31561 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934719AbdCVTVQ (ORCPT ); Wed, 22 Mar 2017 15:21:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490210475; x=1521746475; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=PJY67kKOo87Y208Gzn34dGmhszUwj++Mtsfgfw/MFrM=; b=tQPqBmdFzSGZA97gUg8ulgVIpjjsh/59NJjXaXD5NvydO4fvvj/n2CKE J2J6tRtx8NB22gQ/j8PZaJkrerbEVw==; Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2017 12:21:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,206,1486454400"; d="scan'208";a="1111167460" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 22 Mar 2017 12:21:00 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3E3E41B2; Wed, 22 Mar 2017 21:20:58 +0200 (EET) From: Andy Shevchenko To: Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , linux-wireless@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1] NFC: netlink: Use error code from nfc_activate_target() Date: Wed, 22 Mar 2017 21:20:58 +0200 Message-Id: <20170322192058.30193-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It looks like a typo to assign a return code to a variable which is not used. Found due to a compiler warning: net/nfc/netlink.c: In function ‘nfc_genl_activate_target’: net/nfc/netlink.c:903:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^~ Signed-off-by: Andy Shevchenko --- net/nfc/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 03f3d5c7beb8..03be522127ec 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c @@ -918,7 +918,7 @@ static int nfc_genl_activate_target(struct sk_buff *skb, struct genl_info *info) rc = nfc_activate_target(dev, target_idx, protocol); nfc_put_device(dev); - return 0; + return rc; } static int nfc_genl_dep_link_up(struct sk_buff *skb, struct genl_info *info)