Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3438981pxb; Mon, 4 Apr 2022 17:03:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7c3uZF2D+Gj9o9+9REn9Dum3DssmKWb/HH4xxGdT1fIk46Dxq4O05iZUEOtTWTtHVRNKN X-Received: by 2002:a17:902:9345:b0:153:4d7a:53d9 with SMTP id g5-20020a170902934500b001534d7a53d9mr656898plp.116.1649116997295; Mon, 04 Apr 2022 17:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649116997; cv=none; d=google.com; s=arc-20160816; b=PNZkT57WQwe9k0tQY275B5RPkVRjT+2PLciAuTuEIqWDwWmlf7V9tjPiI4SUbXUrRY irVlI0ZO2tGfhe3EnXrGzvMaYdSut5U/HiR46wf35v/0eremr4pO3KFTZcoLnJrLWCl+ PTZ5PTDOFXWnFQdEupH/DqVaS4jUdXdUx3FKRz+x1WSc13Bt4kAZmGFVHnwspQHARzSr dUOdSUvqwtICaQ89EEv9xFki48uEffBF0+ZoFJsfspi9ndHT0zoylZpS3s41oVtTl34m ETBhXHOh2ZkmnseFiS2FsurxNVPwXTM4SciuNXVFIxXucREsyymfBfbhDaNI8MRADqXy PBCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bM1qv869mLVj0L15vUr24+B+GszxmRptC2PdqnBJ5K4=; b=DDcgyh8JH5j5VjlAQGptPRlJtVqtmuyFB1mxZv3TYya6mZ+Bg7rFmpNMBt7MC72K0Y jLYc2BoJI+vUKEEMYR0QfGo0c8i0V2DBzoj+l03nSJM1naGf562Z7c1zAA80zeURowto WbLiwkov68oZdM71iWPzCSKi664d8HZEi2hkEzHxBH+WN6XA3zPjNch8+mhKD9B0ZB1D TwDkUjbYxWgXq5MyML4eNCPahbfIGkjDbBCV72zQdiTZHvvQkRd+yjEbC4JyOORCQkGA wNF3S2Cq61de38ne5wMpzgluD+J3YYzMUq1FzJtijTNcAsio7LxiNaQkVr/x+Fjz1ASY oByg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SlUPIUKC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x6-20020a1709027c0600b00153b2d16435si6629431pll.61.2022.04.04.17.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 17:03:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SlUPIUKC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9AA4931DC2; Mon, 4 Apr 2022 16:39:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237478AbiDBNYV (ORCPT + 99 others); Sat, 2 Apr 2022 09:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242932AbiDBNYU (ORCPT ); Sat, 2 Apr 2022 09:24:20 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82A90173F4D for ; Sat, 2 Apr 2022 06:22:28 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id u3so7880896wrg.3 for ; Sat, 02 Apr 2022 06:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bM1qv869mLVj0L15vUr24+B+GszxmRptC2PdqnBJ5K4=; b=SlUPIUKCXurYXUIrs3NwfGg0Q69oEQSC4nOx9sE0oKSjX80eII/DdEotFI3Bsbtvtu l3jr+SAkdZKyZMX49mQuH0CLAd9dv8kunEEmIrXttd113lXE7z5xMzayFiJ0fHkWqOAb TUP8L74xzEv2V1T43r0FZtVnZ3NLmx5MDGJDpKHf/9VQ9gU677ca+83lObYF6iyLdksJ d1WoSgAvcktQuGOqpMOZWuFeZZ/56PcyVAAJ7kY4ejRYSbd9WcmJlU4wpnViOyC38fa9 hKW+fbSCyf7eyAvikq8Ane9Fd0m9j9NFJe1p5IQxW+CNWF+WGGsIFkVWN2n7GzsUw6AL jYxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bM1qv869mLVj0L15vUr24+B+GszxmRptC2PdqnBJ5K4=; b=KUWsWewBVxi2xgxPxx/8LULZOVWqVXFkc2bwQrMf+8oJogyMzMayuD1zyP+ekanvz/ lyUYJe5R3uwk3hXLIyWOABjKzFE3gx6gA7Ac4ueBcWdWSk8fojrAYOXoQfvYLL3+L9UH El7cXZHXnWLofuonCGQ0IlB8Eea85cN1g4YNzugT7iwVC50LFKPCpfuqK6ldSjlOSCrU ZEwsTIIDE3d0I+rqAvEib2oGmnWucMuRbnKyfFslaJ7yK+vIkoD0kyuZbLKrd8SjsCMQ Cwjs8By2IEZQ9+UJYS7mFnrxZXOGynFhhrGkK7tf4r4RiN1HTHAFu/59TNRr9GkRAItd dyEw== X-Gm-Message-State: AOAM5325rDTS4UobWFxTqdyFQOWPJjb9FGa+HMhhFl/28uFo1aInOUeS oFxe/UiZtpyodcM5K5QA6Pc= X-Received: by 2002:a05:6000:1e16:b0:206:40c:872d with SMTP id bj22-20020a0560001e1600b00206040c872dmr2204783wrb.535.1648905746951; Sat, 02 Apr 2022 06:22:26 -0700 (PDT) Received: from leap.localnet (host-95-249-145-232.retail.telecomitalia.it. [95.249.145.232]) by smtp.gmail.com with ESMTPSA id y15-20020a05600015cf00b00203e324347bsm5530402wry.102.2022.04.02.06.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Apr 2022 06:22:25 -0700 (PDT) From: "Fabio M. De Francesco" To: Martin Kaiser 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 Date: Sat, 02 Apr 2022 15:22:23 +0200 Message-ID: <2108195.Mh6RI2rZIc@leap> In-Reply-To: References: <20220401183513.26222-1-fmdefrancesco@gmail.com> <1724388.VLH7GnMWUR@leap> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 On sabato 2 aprile 2022 13:45:33 CEST Martin Kaiser wrote: > 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 > Hi Martin, Thanks for reminding to me that a vfree() on a NULL pointer is a no-op. I'm going to submit a new patch with the purpose to re-work rtw_free_netdev(). Thanks again, Fabio