Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3009819pxb; Sun, 29 Aug 2021 10:15:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs92LsxvGhwGi5EIs7/RxH1Zvv1LvvOvosLjki9fv9X7Xq/n8whGmgFrh8cF2I6u7TlZj0 X-Received: by 2002:a05:6402:2286:: with SMTP id cw6mr11440456edb.8.1630257337391; Sun, 29 Aug 2021 10:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630257337; cv=none; d=google.com; s=arc-20160816; b=co4DT87w40jPDdTil13xexff8N/6/AzVBsah2UsFUgb4DIR5hzUPg3EiQ4nrfJKTke bCRePe9k3tib0jPOHWpdWSTALwNwoQKNtWgxpexcWvilk3OTiIoysgyP185gTd/kP9a0 r51vgKmyryahimcf2oV4RybKm8/CtLBSxqZMvfF4Bdst2I9JGqpeQgQ6/1cVPmJEIoz/ VuODe6qcJS18oeMdGCYZ+//f177MlDqwsvjOz/89jBH/9G+zfXa1H2uots9AQLzaRzij 0QdaT9nqG+AxODkFM0G7lEICgWAOZVNDBoVSd2U3xzVxwG1v35xHLU0LMsPXf10wbeAp 3qCg== 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=X3+Hge5VWCPxleA7QjQ9uJdJi5TXCLwleImqMNApEkI=; b=kLk5WkhHlNMpirIwXmu2nzxio2SACE7j12PnzlL/8ayZbkQ1RYxUgSUKx1LF6JzQCi MJ5M5vEHcNXKOFA679MRMFSjDHk7SNPd0Uiy5RJnIPxwySUNAqPZwx3Sxv3/89+QPKv4 8iEOa6LD7uNiziqoDlYgp9VsLpZM4tffzRTvtoJNyYyKZ2C8JSAAv+rrOA6/dkt2cYMR Q0OvA0tJqh+omQdjhIoU8SWqMgzUGRZd8OvXxDGoE4pxbAIh2pT13cBLXmQbZejuhH2H uNMOkm6xa8dXw77WOIItEGoQfbFNlf7uspuwD1bsUnWfUBXYB+uW8wiD96+Aly8ypAQ/ ukRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b9XXk5Tc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si12581050ede.550.2021.08.29.10.15.07; Sun, 29 Aug 2021 10:15:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b9XXk5Tc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235881AbhH2ROs (ORCPT + 99 others); Sun, 29 Aug 2021 13:14:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbhH2ROr (ORCPT ); Sun, 29 Aug 2021 13:14:47 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE73C061575 for ; Sun, 29 Aug 2021 10:13:55 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id p15so21564701ljn.3 for ; Sun, 29 Aug 2021 10:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=X3+Hge5VWCPxleA7QjQ9uJdJi5TXCLwleImqMNApEkI=; b=b9XXk5TcEVP5nklPH7fPEnLD9pWgNcZ5Yhx5UUR/PFUhm1m6N7k6QSm050VxqTFXLk je0jH7RFFDFKjdUCyaMUBI7pKf3v6VpE1Wn55cfI3WxiGveSr8tJSCNX77FmlOW1FlBf MVk1EFVvCVQVe6W4GnHsVMvJbun2843NRqMADbS9l0XplcFn2Rc4yeU4dW/xj75d9SWv W1t0Br8TUxliR1k+3JaEGARUPotYG2t0NdKbeMMnhY/dAM27T99nuILA4H1ylU8TJu8o bNSEMS2WycL8IjI4XwWDH27EA8XRYQ8d4WiO428jVXZolxdzvbuGbdPqzwV1iiDaPenG GsVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=X3+Hge5VWCPxleA7QjQ9uJdJi5TXCLwleImqMNApEkI=; b=rm02ojtmGwVKheaBh08nhcIGztvRmSOH+70gIYyzILHMgnfH+fSLf0o1R4J2cxovT7 b+0Qen5C2SSS+QHK3lfcTOm6RYsfYYuw5YJW4Krf/E22RaOjY1CDMr8EcxNUShuX/Tsm h4ehzPY5z8vRpQD8OBGPofEx1dNVdh4se5hk45XWgHsr43fmXj9FI1V4YEni8LnZoYr0 z0C7ltz93oV+LpVz21PWzynGE33T4Rpi6CIUPTF8Xw+JuKSyKRsAhyyvJfYBcRdb9txt g/xCWxAFUhjQ7BHYFX7vGSOuIeIggojW0aqMIBSZEgWlgbC9Ezp9LfdLlLZz4Ldgz9ZB SJ/w== X-Gm-Message-State: AOAM530INchMfL7aYm4fGPYslWISGtENHPKg86jxJQezq4dDRTcTLgk2 PSyJmRh3WootTILGEWf7vXSX0P9Zn1Ff1w== X-Received: by 2002:a2e:90da:: with SMTP id o26mr16725947ljg.504.1630257233635; Sun, 29 Aug 2021 10:13:53 -0700 (PDT) Received: from kari-VirtualBox (85-23-89-224.bb.dnainternet.fi. [85.23.89.224]) by smtp.gmail.com with ESMTPSA id n15sm1131731lfq.270.2021.08.29.10.13.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Aug 2021 10:13:53 -0700 (PDT) Date: Sun, 29 Aug 2021 20:13:51 +0300 From: Kari Argillander To: Saurav Girepunje Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, gregkh@linuxfoundation.org, fabioaiuto83@gmail.com, straube.linux@gmail.com, ross.schm.dev@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree Message-ID: <20210829171351.u63zoaqa3x5qfodt@kari-VirtualBox> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 29, 2021 at 10:30:09PM +0530, Saurav Girepunje wrote: > Remove NULL check. NULL check before freeing function is not needed. > Correct the indentation. > > Signed-off-by: Saurav Girepunje > --- > > ChangeLog V4: > - Add Change log below --- line > > ChangeLog V3: > - Add change log. > > ChangeLog V2: > - Correct the indentation. You need "---" here also. So everything what is between --- here --- will be ignored when you apply patch. This is good place to write changelog, if you have tested this with real hardware, if you have any guestions about your own implementation etc. > > drivers/staging/r8188eu/core/rtw_sta_mgt.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c > index f6dffed53a60..c3600cb1790a 100644 > --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c > +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c > @@ -155,9 +155,8 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) > spin_unlock_bh(&pstapriv->sta_hash_lock); > /*===============================*/ > > - if (pstapriv->pallocated_stainfo_buf) > - vfree(pstapriv->pallocated_stainfo_buf); > - } > + vfree(pstapriv->pallocated_stainfo_buf); > + } > > return _SUCCESS; > } > -- > 2.32.0 >