Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1253504iog; Tue, 14 Jun 2022 02:22:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sHHAo/1WMkSZ2v7Cp/mPWScWwFOzqt0Cxsm6dtOz7JxkP7vwGLW7eJowOfLZKADtqKX9xC X-Received: by 2002:a17:90b:33cd:b0:1e6:8a38:f0b9 with SMTP id lk13-20020a17090b33cd00b001e68a38f0b9mr3589818pjb.64.1655198568227; Tue, 14 Jun 2022 02:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655198568; cv=none; d=google.com; s=arc-20160816; b=BC0DZ5oH4GR7Q56IQfa/KNKSVzF8A6oO9ZyPH8vbixE6oLd3zZv1tqggstXqdc1uc0 nlf0+Iwde3C3wyMRrFvGymDuZGppSiHGzTN5NWLeA96x04VzPsJLBy0QQeu9WHWWjBG+ ggmn3K1CiqB3bR9xbK413d40ja5rKtV3u/rWufkqXXOuYpSuzKPyw2NGx47dlCz9MbFu NXb7xKoip1fbg5Qom7GLhP4O+Dc4dvCuZnsuXVbqcBJYV01oXuTLC8xfyhWLFnMEXS98 HpkBP23wK6PnOIcRJ7YJoi3Yi+gpf/WiO6SDAoB+gie1/yaO4F2fSxUfp6cnrbeUPvrN RSCQ== 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=TkiYufZH6uL3Pnm1su9kXhAWiZlz+1VbbHUb/nYIjuw=; b=hIQrWAN/OThQipT7y+PN/RZfkqX9JmMGh3LNqUxrfB9CEqRigTUtWddsGBajPpqzqm qdGudrZyFF6xcsHLDvmEw3upIlxS5rd1sSs+/6j4TQTSEHvFtY59ly+ULA5wH0Dy47d7 Yw2T5jjiHG4DaCGkzf1CYjVjK1FQTit1mXixjFaQdFxtRu2ZANi0lPbeBNH7BmwA5k8b lF4c8CbTOJrYHTp29huKtSNSQUfrRTl9s3imuiXtWU3+YvkBgHUpxGTDXGwZRzpUzgo/ Bw7yyGbsH/U3Q9J24CLwU3jz3k+EL0tPGusKodXC7ag34uoEawRVVvwooP5CaR1RAlr4 fKfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pjW3FSHU; 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 b3-20020a631b43000000b003fc137079c2si12599769pgm.60.2022.06.14.02.22.36; Tue, 14 Jun 2022 02:22:48 -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=pjW3FSHU; 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 S1354716AbiFNJSk (ORCPT + 99 others); Tue, 14 Jun 2022 05:18:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233422AbiFNJSc (ORCPT ); Tue, 14 Jun 2022 05:18:32 -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 D29D83FBE6 for ; Tue, 14 Jun 2022 02:18:31 -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 54CD1B817DC for ; Tue, 14 Jun 2022 09:18:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A26FC3411E; Tue, 14 Jun 2022 09:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655198309; bh=YeE9jrUyw9QrNFv2HwkbJWwjrAFDZqNqb/wb75IXkqQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pjW3FSHUhb7Desv7/QvW2HqgBaKTuiptA1StxId9jiUqorlZ2yiuqvuNWqcECzIr7 IFqOi64Dsgj8QKtLHat8oAh6aTXtE9LIuiFmXAd0AmyHLaO9G16knXDb6TXYaHqfo2 C+1ar3LKYFtsc6NhGpUsZRQf5RfIkDaQpOoKznUQ= Date: Tue, 14 Jun 2022 11:18:26 +0200 From: Greg Kroah-Hartman To: Dongliang Mu Cc: Larry Finger , Phillip Potter , Martin Kaiser , Michael Straube , Pavel Skripkin , mudongliang , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] driver: r8188eu: remove NULL check before vfree Message-ID: References: <20220614090340.123714-1-dzm91@hust.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220614090340.123714-1-dzm91@hust.edu.cn> X-Spam-Status: No, score=-8.3 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 Tue, Jun 14, 2022 at 05:03:30PM +0800, Dongliang Mu wrote: > From: mudongliang > > vfree can handle NULL pointer as its argument. > According to coccinelle isnullfree check, remove NULL check > before vfree operation. > > Signed-off-by: mudongliang > --- > drivers/staging/r8188eu/os_dep/usb_intf.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c > index 68869c5daeff..bd1c8b4b5c4b 100644 > --- a/drivers/staging/r8188eu/os_dep/usb_intf.c > +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c > @@ -372,8 +372,7 @@ 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 changed the logic of this code here, please be more careful in the future. Also, you need to use your real name for the signed-off-by and From: line. thanks, greg k-h