Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp940477iob; Fri, 13 May 2022 17:10:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1e7ISyOezcG85PCOEvGJPAnLeUTZysXAlUbuROXozeoJGzJW9JF1ESr3qqoLAx19PoMHP X-Received: by 2002:adf:dd92:0:b0:20a:d831:222f with SMTP id x18-20020adfdd92000000b0020ad831222fmr5515646wrl.401.1652487053058; Fri, 13 May 2022 17:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652487053; cv=none; d=google.com; s=arc-20160816; b=su4XKf/hZ5u9+NZcyJaILp36bj9bUSmHTBGpGlaYCXYTfg1RJfOpdRdERvfzdTqZlE ksN/u9jrGPBlfZQZxMmCXdQgeQuVpyMWF5NKsK3A52UCjcy63zaGSF0Z1Yyp0s60OcjO 9Pz5gVp9IqdM4EqYJFE7/OjnmEiC1EcKX8yXOxic9bDjkFOoJiDcPjmN8WRQwMtmJieq C0ckBI65WFuFM4EKZAvDPTGBRm0ibOt9sbWrzksSw9wgYw9G8eLk9rdWTUeGmc1Kv0EB OodcWaAU620mqLITfJs/d3MT9Ge5Dk+1yPI/Q8vISTlcDeABc89+JJuCMIknelNPC8dk 4B1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2wzeE42QztFii3fxkosYRKX8Pzjwc5PoYxtPSY7auuE=; b=DUTWKJsB3MQLeyJrASb2Jnjrn6MGcZPALgd+z65lO6/Fd6eEH4SJEtVXx3BFb8TWQF K1UWAdeerX+o+LXEA/Tux3vDus7qKpK5GOCV4eDd5QIMo9AvZKHh3grIfDZj8Nj6AD0T SX9YoVoD3qiJSYSFveLRXr9zDGopvY49xHZiskmkYDwCskU+tadwAB3vys5slcWKGXQt SiF0l74NxHae5QH8Qlt2ARyEsujGpzoFtzHtdLcxBiUnYajRoTk4tNA33x8cvwIM11ax AfSoEExaZh9buBORykr5GFEzGDpf+DSGZW7xNby41GvJUOZR7xjEkTHDtcJjeBdy54a3 nlKw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z16-20020adfdf90000000b0020aeb9e5c03si3571432wrl.650.2022.05.13.17.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:10:53 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 261F22FBBD1; Fri, 13 May 2022 16:12:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350543AbiELGxf (ORCPT + 99 others); Thu, 12 May 2022 02:53:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238889AbiELGxb (ORCPT ); Thu, 12 May 2022 02:53:31 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C4A920CA71; Wed, 11 May 2022 23:53:26 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id D85301C0B92; Thu, 12 May 2022 08:53:24 +0200 (CEST) Date: Thu, 12 May 2022 08:53:24 +0200 From: Pavel Machek To: Miaoqian Lin Cc: Linus Walleij , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] leds: netxbig: Fix refcount leak in netxbig_leds_get_of_pdata Message-ID: <20220512065323.GA8632@amd> References: <20220512050253.8987-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20220512050253.8987-1-linmq006@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > of_parse_phandle() returns a node pointer with refcount > incremented, we should use of_node_put() on it when not needed anymore. > When of_find_device_by_node() fails, of_node_put() is missing. Can you take a look at the code and simplify it? AFAICT the node_put should go right after gpio_ext_pdev =3D of_find_device_by_node(gpio_ext_np); =2E Best regards, Pavel --=20 People of Russia, stop Putin before his war on Ukraine escalates. --opJtzjQTFsWo+cga Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmJ8ruMACgkQMOfwapXb+vKxKgCgq/LbToDnu8kaUevCNBdHaZOZ AQsAnicnD76UXE6zBRhSWkb9/6Kf7A0I =dBm7 -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga--