From: Sebastian Reichel <sre@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Milo Kim <milo.kim@ti.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] power: supply: lp8788: remove an unneeded NULL check
Date: Wed, 19 Oct 2016 05:38:03 +0200 [thread overview]
Message-ID: <20161019033803.i4z65zpttyz2asft@earth> (raw)
In-Reply-To: <20161014073328.GC15168@mwanda>
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
Hi Dan,
On Fri, Oct 14, 2016 at 10:33:28AM +0300, Dan Carpenter wrote:
> We checked that "pdata->chg_params" is non-NULL earlier in this function
> so when we add "i" to it, it's still non-NULL.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/power/supply/lp8788-charger.c b/drivers/power/supply/lp8788-charger.c
> index 7321b72..509e2b3 100644
> --- a/drivers/power/supply/lp8788-charger.c
> +++ b/drivers/power/supply/lp8788-charger.c
> @@ -384,9 +384,6 @@ static int lp8788_update_charger_params(struct platform_device *pdev,
> for (i = 0; i < pdata->num_chg_params; i++) {
> param = pdata->chg_params + i;
>
> - if (!param)
> - continue;
> -
> if (lp8788_is_valid_charger_register(param->addr)) {
> ret = lp8788_write_byte(lp, param->addr, param->val);
> if (ret)
Thanks, queued.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
prev parent reply other threads:[~2016-10-19 3:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 7:33 [patch] power: supply: lp8788: remove an unneeded NULL check Dan Carpenter
2016-10-17 0:40 ` Kim, Milo
2016-10-19 3:38 ` Sebastian Reichel [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=20161019033803.i4z65zpttyz2asft@earth \
--to=sre@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=milo.kim@ti.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;
as well as URLs for NNTP newsgroup(s).