From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from viti.kaiser.cx (viti.kaiser.cx [85.214.81.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4A5F7C; Sat, 2 Apr 2022 11:45:52 +0000 (UTC) Received: from dslb-094-219-034-140.094.219.pools.vodafone-ip.de ([94.219.34.140] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1nacCE-00019f-8u; Sat, 02 Apr 2022 13:45:34 +0200 Received: from martin by martin-debian-2.paytec.ch with local (Exim 4.94.2) (envelope-from ) id 1nacCD-001Fxh-K1; Sat, 02 Apr 2022 13:45:33 +0200 Date: Sat, 2 Apr 2022 13:45:33 +0200 From: Martin Kaiser To: "Fabio M. De Francesco" Cc: Ira Weiny , Greg Kroah-Hartman , Larry Finger , Phillip Potter , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Subject: Re: [PATCH] staging: r8188eu: Remove goto to no-op exit label Message-ID: References: <20220401183513.26222-1-fmdefrancesco@gmail.com> <1724388.VLH7GnMWUR@leap> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1724388.VLH7GnMWUR@leap> Sender: "Martin Kaiser,,," Thus wrote Fabio M. De Francesco (fmdefrancesco@gmail.com): > > > pnpi = netdev_priv(netdev); > > > if (!pnpi->priv) > > > - goto RETURN; > > > + return; > I cannot see how pnpi->priv might ever be NULL. Even if pnpi->priv was NULL, we wouldn't need the check. It's ok to call vfree(NULL). > After the two removals I've talked about above, the code will always call > vfree(pnpi->priv) and then free_netdev(netdev). That makes sense. Best regards, Martin