From patchwork Wed Apr 2 07:56:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daeseok Youn X-Patchwork-Id: 3927151 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6DCC19F2F7 for ; Wed, 2 Apr 2014 07:56:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A77020251 for ; Wed, 2 Apr 2014 07:56:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF86E2022F for ; Wed, 2 Apr 2014 07:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752064AbaDBH4h (ORCPT ); Wed, 2 Apr 2014 03:56:37 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:49294 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424AbaDBH4g (ORCPT ); Wed, 2 Apr 2014 03:56:36 -0400 Received: by mail-pa0-f45.google.com with SMTP id kl14so11156076pab.32 for ; Wed, 02 Apr 2014 00:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-transfer-encoding:content-type; bh=euL2ci55hT9i25oUvhm/JSeioWF67UgQJ7WPDcQo7sw=; b=yaO2HAOxVHRJKC5PfpKyi17lrgWjqlirmg+iSnnHSZQlVSICLpukl/B4bq+YVZ76Vq Q1T9ZQJRLUAHeQDK2zVDuEqVgO1dRoJOWjMLr3Z1pUhwDS7vI0YekDkEsUjF8HzkFc3p 6JAUCpEF9SPsCbzwNnY+7uaEB3QURbJhFD1BdSvm8eqQmHUcHCXWpI/FAKAXTkBURjDJ uxZRC0f+EF1x59SHVKwK0KEOYoCIIJ31FaOEEkivJKpV2Hs7jFuAPTDMo57EvTzuN5KZ uvEWfMb0xfc3ScMd7W2thjloXuhj8jpgYUD48foBcdffkATHZ34X3HSravR2O71pi90b yvbA== X-Received: by 10.68.58.34 with SMTP id n2mr18590200pbq.122.1396425395439; Wed, 02 Apr 2014 00:56:35 -0700 (PDT) Received: from daeseok-laptop.cloud.net ([121.50.21.19]) by mx.google.com with ESMTPSA id yv5sm2577605pbb.49.2014.04.02.00.56.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Apr 2014 00:56:34 -0700 (PDT) From: Daeseok Youn To: davem@davemloft.net, lauro.venancio@openbossa.org Cc: aloisio.almeida@openbossa.org, sameo@linux.intel.com, linux-wireless@vger.kernel.org, linux-nfc@lists.01.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] nfc: remove unneeded nfc_put_device() calls Date: Wed, 02 Apr 2014 16:56:31 +0900 Message-ID: <31741678.fEkJSmnf5n@daeseok-laptop.cloud.net> User-Agent: KMail/4.8.5 (Linux/3.2.0-58-generic; KDE/4.8.5; x86_64; ; ) MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If local is NULL, nfs_put_device() is called twice. So nfs_put_device() in "if (!local)" is removed. Signed-off-by: Daeseok Youn --- net/nfc/netlink.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index b2ad570..3e0a676 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c @@ -1038,7 +1038,6 @@ static int nfc_genl_llc_sdreq(struct sk_buff *skb, struct genl_info *info) local = nfc_llcp_find_local(dev); if (!local) { - nfc_put_device(dev); rc = -ENODEV; goto exit; }