From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36515C433F5 for ; Sat, 2 Apr 2022 11:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351697AbiDBLro (ORCPT ); Sat, 2 Apr 2022 07:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344929AbiDBLrl (ORCPT ); Sat, 2 Apr 2022 07:47:41 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE9F510240E for ; Sat, 2 Apr 2022 04:45:48 -0700 (PDT) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1724388.VLH7GnMWUR@leap> Sender: "Martin Kaiser,,," Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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