Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2698770pxb; Sun, 29 Aug 2021 00:36:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZJzCo6DqhvWkQ7JH1uXk1vYz2LORH+tvc7C+r/JrhAFuLcqBrQwTwD97gAkUL28JOKAFh X-Received: by 2002:a92:c151:: with SMTP id b17mr12361598ilh.1.1630222595030; Sun, 29 Aug 2021 00:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630222595; cv=none; d=google.com; s=arc-20160816; b=L9EyYoJavDog4kYldPCWd2Yv4ThTt5XvdCrsPgZ4N9FnLx2bFinL6/ZFB91FaVf6uC afS7lL84zrWF64AnFVy3pu3i32BwqW4C2CHgFW47ETuXAOra0lDiBCZ0Q1yRW76juTAF RrtghoMVAtyZDJ36v16tjTHjANIqXlAt+c/fbO5fyF9SNg8nDAwwg+88mPebVCexMSls vyFIzNDsu121+FGh3TLESBXBciuV5GtlSIk+YjyHyjfkPWSVVKg49yY+oypI0StZhIC9 PLz8ZKcyTaMnoa9Pe7oCmNNLXlolPF03vusYocMNMO21yLMeN+q0EyErX3V1YaLVkMP6 RxUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=rNBZsqRJ7sa4jw3snokI5dgLfCm8tugTaRJ5CIejBq0=; b=TJLTQqLuhCKA6B9n8mMUoDpNWB9FeJxiobqIKlhKddKwGG6Dy9ObLKZiJmjHu9PSqG +uuOoheWxCV7VVxlrsRWdofshEBaleMjpaZuZwNwfH0MmY4ZqIusZcN56vQq0toa5emp Na2yIhsIf3I33oCfC/4EqnNIWbVDcHDwH/E5l20egbF0SID6X3Iifo47tZmSTwCdBI8T AxufszTuGqvPSowv09lDEIw1NGNBbPsKDstf2/8S0a+7hdMc1ckvUMG7eOij/pMX5meb Gw/o3fImGZoX+SWFi55exudxOlJJ8oZS+U++6nq3UUWRNPhEiOw7Zs2oBgNmbNYayyXu DXXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dm2H49KM; 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 i7si11000846ils.74.2021.08.29.00.36.23; Sun, 29 Aug 2021 00:36:35 -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=Dm2H49KM; 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 S233288AbhH2HfV (ORCPT + 99 others); Sun, 29 Aug 2021 03:35:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbhH2HfU (ORCPT ); Sun, 29 Aug 2021 03:35:20 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE061C061756 for ; Sun, 29 Aug 2021 00:34:28 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id u13-20020a17090abb0db0290177e1d9b3f7so11713841pjr.1 for ; Sun, 29 Aug 2021 00:34:28 -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:mime-version:content-disposition; bh=rNBZsqRJ7sa4jw3snokI5dgLfCm8tugTaRJ5CIejBq0=; b=Dm2H49KMf8j0JXlHRKQ9ytI3sqTvTgYyeX6jrra2h7aR4/RNNLu2h1yRD7Yosp5bJV upqmr11UgxRQpD8xUbltTH4YojLPRbkh7RPUN/DZwNy7w/sqnA9prPHhtdBvHyN0BN8T lQZT+Qe1z4gMIydI1HLUf/EPDiwVtfQlgQ1C7+jNGnzaWngYXTTBFnJB2B3hcCUUNBBe eIBdYhnfoG/dNfBLKTq6aWPoHFNywFX4FaE8eFPWRs+9ZOuLMaE2mF/XpgkwfG3lUWcY ZHRLgrgH6DqLXD1OlM3hP3uYbTY40syiQMhW0AllGMswzl/toDZXkwb3wp2brJzNgcQS KKCA== 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:mime-version :content-disposition; bh=rNBZsqRJ7sa4jw3snokI5dgLfCm8tugTaRJ5CIejBq0=; b=Z2llhhX5KYexzcAABLoyXAvHUI788ClF4j3EUa5jfeaUh3VnF8OEZycPYqF8/rKlhR TQ/jFG9AYQ66wxkt1dmcG9hTE7s57OMce4BnahiMKur4rhKzA8tmNiSyCsHNif1YcPO0 T5JzXShYIpvffyMQFOmYmp7OZdaTVAsdUfYzVCNgV4WHMwT+p+mjAz5i12z4JgUGl1rT Mb1euPl4i49qjGSmdve9AUB6FFEfkugLJj1glBn/ZLBo1WkeZG3iBemlR+LtstvngbZr 4mBJK0fk6aprQIvSZ/l2kkJeoH8IsSK/7Je0i8DGbPcV9YbCmu+JoAxJSMbhBy7O/ulR Em2g== X-Gm-Message-State: AOAM531N6XyPwgso/wJ03v9FlTvDck8wZFhB26PXfvHvJN+wrNtEnk+O ORV47MzluVl1U+yx6TgCuIk= X-Received: by 2002:a17:90a:2e88:: with SMTP id r8mr32311223pjd.169.1630222468075; Sun, 29 Aug 2021 00:34:28 -0700 (PDT) Received: from user ([117.98.200.228]) by smtp.gmail.com with ESMTPSA id a23sm6262239pfo.120.2021.08.29.00.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Aug 2021 00:34:27 -0700 (PDT) Date: Sun, 29 Aug 2021 13:04:22 +0530 From: Saurav Girepunje To: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, gregkh@linuxfoundation.org, straube.linux@gmail.com, ross.schm.dev@gmail.com, saurav.girepunje@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH v3] staging: r8188eu: core: remove null check before vfree Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove NULL check. NULL check before freeing function is not needed. Correct the indentation. ChangeLog V3: -Added change log. ChangeLog V2: -Correct the indentation. Signed-off-by: Saurav Girepunje --- 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