mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nitin Kuppelur <nitinkuppelur@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: rtl8712 removed unnecessary else after return
Date: Wed, 01 Oct 2014 10:44:09 -0700	[thread overview]
Message-ID: <1412185449.3247.18.camel@joe-AO725> (raw)
In-Reply-To: <1412174651-21418-1-git-send-email-nitinkuppelur@gmail.com>

On Wed, 2014-10-01 at 16:44 +0200, Nitin Kuppelur wrote:
> Removed unnecessary else after return to solve
> checkpatch.pl warning
[]
> diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
[]
> @@ -389,10 +389,8 @@ uint rtl871x_hal_init(struct _adapter *padapter)
>  	padapter->hw_init_completed = false;
>  	if (padapter->halpriv.hal_bus_init == NULL)
>  		return _FAIL;
> -	else {
> -		if (padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
> -			return _FAIL;
> -	}
> +	if (padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
> +		return _FAIL;

Perhaps a more common style is to use:

	if (!padapter->halpriv.hal_bus_init ||
	    padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
		return _FAIL;



  reply	other threads:[~2014-10-01 17:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 14:44 Nitin Kuppelur
2014-10-01 17:44 ` Joe Perches [this message]
2014-10-02  7:39   ` Nitin Kuppelur
2014-10-02  7:44     ` [PATCH V2] " Nitin Kuppelur
2014-10-02  8:47       ` Dan Carpenter
2014-10-02 11:33         ` [PATCH] " Nitin Kuppelur
2014-10-02 12:32         ` [PATCH V3] " Nitin Kuppelur
2014-10-08 22:44           ` Greg KH
2014-10-09 15:30             ` Nitin Kuppelur
2014-10-09 15:48               ` Greg KH

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=1412185449.3247.18.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nitinkuppelur@gmail.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

all inboxes | Powered by JetHome®