Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4126511rwj; Tue, 20 Dec 2022 06:28:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf5XzA+Sj2aBR0QtE2bslqRVY1AGoeTm16Lc1a1ol15rWiv7ZGwgLl0ZrmAteeCcSUcNiW2A X-Received: by 2002:a17:906:f214:b0:7c0:f459:d09c with SMTP id gt20-20020a170906f21400b007c0f459d09cmr38061616ejb.16.1671546497331; Tue, 20 Dec 2022 06:28:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671546497; cv=none; d=google.com; s=arc-20160816; b=IsSErM65BPfHR4+Vdqv2Dq3uu8xBXFhnS+qAhmRd7D8BIJv9xmHzxaxnfOrVtl3ovr xFlC2AWiXp69HfQ05POGJ04qCS1Lk2uBACRhx4I7E04lQl1LcVqpuKf/owhn3cPQAMvl 2Ece4W7uokx9QiDJVPvwCokz5+qXk2X7JrhHc2/eNCszGYGEu4+0w1n0cUkZ0mNo3Z1G tOJ7TqlqKTEvdXJD097eMWk1BUXOUOjUfKH9E7yrJpZWxIqj0WAoGkF2Yub5+el2djWN CUqLvT0fkIUfm2hnHIk96sDCiWPPOIl0iYzTR/0/krmwgoap9tCt7mvImoMcF0rn1cFP l1wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=D8s1ah6+NCIq7LDoVwDkzXxYw5pZPAZuOvBg3tLFJ1k=; b=Qye9iFXVmL7TzSxj3ux3BzJLPP8LExOOOKoT9z8YAsW4b9oMi5Uw00HJFU1gcm313g wdk18fE221056PWpf7I1giDUv2rYCL+7iUnwW+7bgeuFusnLTWQudwCvTCJcJnBITb17 G6IBD9X9Upz93RIaMYwsJKmBZhhtME4UsqgE4RLnuDy1+A16MdAhzbw+zDdpF5pxw6Da mpgOOmgy694SnNjvhwoN/czT6n2sTmwRqfEQ5H34nDsu7uMzl3xwB7Z0BbABHW2oiq2o ZSPbAZMJHO8bvjdXgmeBBK8EUTNkFILEG+UTibWnYX8dTc05OQVxdghG1TLwGq61s6X6 5X/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K+fIsFm9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx20-20020a170906ca5400b007ad4a555cb6si9402766ejb.878.2022.12.20.06.28.00; Tue, 20 Dec 2022 06:28:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K+fIsFm9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232097AbiLTOTx (ORCPT + 69 others); Tue, 20 Dec 2022 09:19:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234016AbiLTOS7 (ORCPT ); Tue, 20 Dec 2022 09:18:59 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F4591BEA5; Tue, 20 Dec 2022 06:18:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671545926; x=1703081926; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=29ds9ocb2MYJd+jt0sFnoQawhblahvCPD7KE3BgiDmk=; b=K+fIsFm96i+1TZnqQNazs7y9nYBIhxZ/zgcx7GqULVOQQejAkTqwSlS9 h3CSyfatCQph3lzhjDGDkmHbqW/jc0SJSEgn6viYf1DoalgpJAzIsCg82 IOG3pnpcq05ZRh3204Hmko85Yhindjn1jLbQcQZfngDLMujahsebIEH/H qdsEbB8GpxKtzEXFyNp9iYXUamWXZL6kGYfsiM6xIP52GYpHBDkvlWlcR wnuP3whNSdIXWppY0cCDK7vGXx6Mh4R8KPXykLTgaNnk5gtkiR0wXWqja MXRsulg1xuYHgaIoNa/QpGkv+k1X3dZ5cuw6P0DtMhNUYKA/7rUQKbIkE Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="320798369" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="320798369" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 06:18:46 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="653121875" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="653121875" Received: from unknown (HELO localhost.localdomain) ([10.237.112.144]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 06:18:43 -0800 Date: Tue, 20 Dec 2022 15:18:03 +0100 From: Michal Swiatkowski To: Miaoqian Lin Cc: Krzysztof Kozlowski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Samuel Ortiz , Christophe Ricard , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nfc: Fix potential resource leaks Message-ID: References: <20221220134623.2084443-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221220134623.2084443-1-linmq006@gmail.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 20, 2022 at 05:46:23PM +0400, Miaoqian Lin wrote: > nfc_get_device() take reference for the device, add missing > nfc_put_device() to release it when not need anymore. > Also fix the style warnning by use error EOPNOTSUPP instead of > ENOTSUPP. > > Fixes: 5ce3f32b5264 ("NFC: netlink: SE API implementation") > Fixes: 29e76924cf08 ("nfc: netlink: Add capability to reply to vendor_cmd with data") > Signed-off-by: Miaoqian Lin > --- Nice catch Reviewed-by: Michal Swiatkowski > -- > 2.25.1 >