Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3087742pxb; Mon, 4 Apr 2022 07:31:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEMUpRr92mhAMQfXhk4Ev6O3u2FU2J226YbBocme6RMgsDVcjy3GcPCyMEX8r45oUOXbv1 X-Received: by 2002:a17:906:9f28:b0:6e0:153d:dc29 with SMTP id fy40-20020a1709069f2800b006e0153ddc29mr323298ejc.756.1649082673911; Mon, 04 Apr 2022 07:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649082673; cv=none; d=google.com; s=arc-20160816; b=hHjhUx4G3dQgRV4xkYZPRJsJS0BmtZ9/uu9urkOaCG/T6/+yxI+6aUpQiTHdGtPhti e/Xfso6eUHXHyJJjJfNQAsgpHDiuaaefrRaFuhhM9c41ddwls3OZMeOrb8coXDuZs7J/ M3D6IgOJZY9I/CI45iemHiL8QaPf/GcQPzxpXYjTgHkDewCWAIkILmZS3iCAVP+e/LDk xMS6M/jhVjwIJYEwUI+ongwLP80smJn35VyFiRoWTDCWyoluqw0VMR7VepgW0qykDlle Yc4pIIiT3m35wVWE3ECMSRMZHPFiXFd1w9cYyK4HBZ3Y3kTBAUs1m6lJCdExSn9y8HcJ 7CKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lTi+tBrvLwsroEQLCKWFbKPd4q8CDca5yRMwCjLFuK8=; b=bJVcsSB/zziuZM4ScssE+/jDCNV0s85cH4HKzCk6A31DAyNmKxvuMOpxcJmqGPeO97 26VQEM8al5K3vNxaReybtisw9GxKRrCSyuxcAWEuRouS4Ekta+gPP4MJL7Mkuixz5udS yWDw9GGrflLvfNbjpR4hLE7v0MCA18BlGRw/aUeaDim04lUo7+F6fAjpUEMBo8vjdR0C bn15wKX3NgEk9PYtmxQPCNABe1RYa14lxmU9rxpb4/oT72lwLk+8XnjON/O5HMXxOKSy nC5hfTFKs1/jIRFmzqAn6LdU+B+xtG43RUO1qy7M+qgwTfKSKnCRDAz1DbXdBkAm+cvR yj9Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a056402510a00b00418d6c3d730si7654953edd.253.2022.04.04.07.30.46; Mon, 04 Apr 2022 07:31:13 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349335AbiDBLrn (ORCPT + 99 others); Sat, 2 Apr 2022 07:47:43 -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,,," X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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