Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1917603iog; Sun, 26 Jun 2022 01:33:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uiDDzASqDD9UUnOv/FEcHiXvsaYVdKPUtr71yseCCKcCeXbtgnYEIAFUH+RJJbCwaNM5t9 X-Received: by 2002:a05:6402:51ce:b0:436:7dfc:4840 with SMTP id r14-20020a05640251ce00b004367dfc4840mr9779957edd.338.1656232437291; Sun, 26 Jun 2022 01:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656232437; cv=none; d=google.com; s=arc-20160816; b=KHQGJYsrjXeszrvpcVukpkwurh822ubNcC4gP+fYBYUy8V2r8vfAz77XgwZJFaZ9cx uLce+NMbnc4t+bLJcaylxukV7/w6SBeQkneP5lbovh7fm7lOUx4XRrTspRWw5ib/rHWn PiIBMN79ceyZAVWJEnfLT3lld+5QcpnHtUSnXQATQ/hYbJXZS4uC6RKEA++NJFpBhYdA wKMFTCBe3uYZRiAOBadln8sG9NW4tlM64JR8GZ4Tc1Uo7JW7egeFjQWrKqDmg6PVy8C2 ovJ1TUDt2M3bpZ9+17I37XCACHVSUWb/03SQEN2iy6fr8gxl7dRIrOJy2cAQ53n7KIcP KXIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SU+Gv4V6JRqMQJTfZDlds9LOLxhBEMZX/quoYTaVjXA=; b=GrWL1FuYTen7y+EVLgdq+N/1yLqUmZDlPXRDlZMWLVfK/ZOZnVfDfUBmkfEYt2tMJS XDF2ygJAP8Iy4OARYtxwjSwyd8O/JzuIOnzjWIUUfWJ0mxVEg7gTtwGOfwxSJKzogSka m+/iEKnNVeTvrgkW4p5Mv83PYTINR/eILcyabYnit6nrdWG5o/hNCGwscSgmD2+wGP3+ MtHE6qHt3bl7T56DGhmqFj94f6x7bWSeJJnoOjjPBSXh0eLwR6cNm7jVuGVqAKSN4mVD YXL2qmzZpZ+JvATaHMnEOpP+j9fLRnK0zWIfCML7LWv4qI4LuJxoEXt0tshUn1PB5gF7 ZSsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="jYKkmQF/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn22-20020a17090794d600b006dfc3945326si7336830ejc.152.2022.06.26.01.33.30; Sun, 26 Jun 2022 01:33:57 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="jYKkmQF/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233948AbiFZIVF (ORCPT + 99 others); Sun, 26 Jun 2022 04:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232734AbiFZIVC (ORCPT ); Sun, 26 Jun 2022 04:21:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B417E12AB3 for ; Sun, 26 Jun 2022 01:21:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4AF63B80D13 for ; Sun, 26 Jun 2022 08:21:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CB3BC341C7; Sun, 26 Jun 2022 08:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656231659; bh=j4UfyQrlOyGm/1PgSuQ/6EcYNsoqlK+aVO223Z4irGE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jYKkmQF/icVatvfbN8EFX8RpGRiEINdNegABCSyzAUB/0UH5j9s000U5c8d+cJHvC 2Q7m3AZi3Ckh+LmZPRwkXSeOF7OZBvMY6UJZ9HvTXmFubhnVXOHYhbwYK5NibZHW9d RDIFUjOy0OyfJW1LqGwWHoP327ey6ubJV58xOBYw= Date: Sun, 26 Jun 2022 10:20:54 +0200 From: Greg Kroah-Hartman To: SebinSebastian Cc: skhan@linuxfoundation.org, Larry Finger , Phillip Potter , Martin Kaiser , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: r8188eu: Remove null checking before freeing functions Message-ID: References: <20220626074417.661312-1-mailmesebin00@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220626074417.661312-1-mailmesebin00@gmail.com> X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 On Sun, Jun 26, 2022 at 01:14:11PM +0530, SebinSebastian wrote: > Fix the following coccicheck warning: > drivers/staging/r8188eu/os_dep/usb_intf.c:376:2-7: WARNING: NULL check before some freeing functions is not needed. > > Signed-off-by: Sebin Sebastian > --- > drivers/staging/r8188eu/os_dep/usb_intf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c > index 68869c5daeff..f5f1119b5444 100644 > --- a/drivers/staging/r8188eu/os_dep/usb_intf.c > +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c > @@ -372,8 +372,8 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, > free_adapter: > if (pnetdev) > rtw_free_netdev(pnetdev); > - else if (padapter) > - vfree(padapter); > + > + vfree(padapter); You introduced another coding style issue, and you changed the logic to be different here. Are you sure you want this change to be accepted? thanks, greg k-h