From: Lee Jones <lee.jones@linaro.org>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] mfd: wm8400-core: Remove unnecessary goto
Date: Fri, 14 Feb 2014 09:37:33 +0000 [thread overview]
Message-ID: <20140214093733.GJ3403@lee--X1> (raw)
In-Reply-To: <1392196213-20576-1-git-send-email-sachin.kamat@linaro.org>
> Return directly to avoid redundant lines of code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> drivers/mfd/wm8400-core.c | 22 +++++-----------------
> 1 file changed, 5 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c
> index d66d256551fb..8788fd1f0a83 100644
> --- a/drivers/mfd/wm8400-core.c
> +++ b/drivers/mfd/wm8400-core.c
> @@ -161,31 +161,19 @@ static int wm8400_i2c_probe(struct i2c_client *i2c,
> const struct i2c_device_id *id)
> {
> struct wm8400 *wm8400;
> - int ret;
>
> wm8400 = devm_kzalloc(&i2c->dev, sizeof(struct wm8400), GFP_KERNEL);
> - if (wm8400 == NULL) {
> - ret = -ENOMEM;
> - goto err;
> - }
> + if (wm8400 == NULL)
While you're here please change this to the preferred 'if (!wm8400)'.
<snip>
Otherwise nice clean-up.
When you fix the above and resubmit, do so with my:
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2014-02-14 9:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 9:10 [PATCH 1/4] mfd: wm8400-core: Remove unnecessary goto Sachin Kamat
2014-02-12 9:10 ` [PATCH 2/4] mfd: max14577: Include missing err.h Sachin Kamat
2014-02-14 9:39 ` Lee Jones
2014-02-12 9:10 ` [PATCH 3/4] mfd: stw481x: Staticize stw481x_regmap_config Sachin Kamat
2014-02-12 13:02 ` Linus Walleij
2014-02-14 9:40 ` Lee Jones
2014-02-12 9:10 ` [PATCH 4/4] mfd: stw481x: Check the return value of devm_regmap_init_i2c Sachin Kamat
2014-02-14 9:41 ` Lee Jones
2014-02-14 9:37 ` Lee Jones [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=20140214093733.GJ3403@lee--X1 \
--to=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sachin.kamat@linaro.org \
/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.