From: Andy Shevchenko <andy@kernel.org>
To: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
Cc: julia.lawall@inria.fr, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
dan.carpenter@linaro.org
Subject: Re: [PATCH v6 2/2] staging: rtl8723bs: Prevent duplicate NULL tests on psta pointer
Date: Sat, 19 Apr 2025 19:25:06 +0300 [thread overview]
Message-ID: <aAPOYhdJoD23b4np@smile.fi.intel.com> (raw)
In-Reply-To: <4fb8314f1ca4c273a1f2c2f648c7993d7708224c.1744990405.git.abrahamadekunle50@gmail.com>
On Fri, Apr 18, 2025 at 03:41:57PM +0000, Abraham Samuel Adekunle wrote:
> The psta pointer had previously been tested for NULL after initialization,
> as seen in the code below:
>
> psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
> ...
> if (!psta)
> return _FAIL;
> This makes a second NULL test on psta unnecessary.
>
> Remove the second NULL test on psta to avoid redundancy in code.
>
> Found by Cocinelle
Missing period.
P.S. Here the commit message is fine, however misindented
(check the indentation).
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-04-19 16:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 15:41 [PATCH v6 0/2] Cleanup duplicate NULL tests on a value Abraham Samuel Adekunle
2025-04-18 15:41 ` [PATCH v6 1/2] staging: rtl8723bs: Remove duplicate NULL tests on pstat Abraham Samuel Adekunle
2025-04-19 16:23 ` Andy Shevchenko
2025-04-18 15:41 ` [PATCH v6 2/2] staging: rtl8723bs: Prevent duplicate NULL tests on psta pointer Abraham Samuel Adekunle
2025-04-19 16:25 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aAPOYhdJoD23b4np@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=abrahamadekunle50@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@inria.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.