public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Saurav Girepunje <saurav.girepunje@gmail.com>
Cc: gregkh@linuxfoundation.org, fabioaiuto83@gmail.com,
	ross.schm.dev@gmail.com, deborahbrouwer3563@gmail.com,
	hdegoede@redhat.com, marcocesati@gmail.com,
	phil@philpotter.co.uk, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com
Subject: Re: [PATCH] staging: rtl8723bs: core: simplify the if condition
Date: Mon, 11 Oct 2021 15:09:31 +0300	[thread overview]
Message-ID: <20211011120930.GI2048@kadam> (raw)
In-Reply-To: <YWEwFf0YMi4W1xKN@user>

You didn't compile test the patch.

On Sat, Oct 09, 2021 at 11:30:53AM +0530, Saurav Girepunje wrote:
> if psta is NULL, function is returning with fail. On next if condition
> again checking if psta is not a NULL. Remove multiple if condition check.
> 

I don't think this is an accurate description of what the patch does.

> Function is already using goto exit statement to exit.Replace multiple
> return with goto exit statement.

No.  Do nothing labels only hurt readability and introduce "forgot to
set the error code bugs."

regards,
dan carpenter


      parent reply	other threads:[~2021-10-11 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09  6:00 [PATCH] staging: rtl8723bs: core: simplify the if condition Saurav Girepunje
2021-10-09 16:51 ` Hans de Goede
2021-10-09 18:14   ` Saurav Girepunje
2021-10-11 12:09 ` Dan Carpenter [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=20211011120930.GI2048@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=deborahbrouwer3563@gmail.com \
    --cc=fabioaiuto83@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=marcocesati@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=ross.schm.dev@gmail.com \
    --cc=saurav.girepunje@gmail.com \
    --cc=saurav.girepunje@hotmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox