public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Anton Vorontsov <cbouatmailru@gmail.com>
Cc: Daniel Mack <daniel@caiaq.de>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] pda_power: remove unneeded assignment
Date: Mon, 23 Aug 2010 23:21:03 +0200	[thread overview]
Message-ID: <20100823212103.GA7340@bicker> (raw)

We never use the "ret" value from this assignment, and also
PTR_ERR(NULL) is zero.  I looked at it and this driver is designed to
accept a NULL value for "ac_draw".  So there isn't a bug in the original
code and we can just remove this confusing assignment.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index 69f8aa3..63a6a4d 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -279,7 +279,6 @@ static int pda_power_probe(struct platform_device *pdev)
 	if (IS_ERR(ac_draw)) {
 		dev_dbg(dev, "couldn't get ac_draw regulator\n");
 		ac_draw = NULL;
-		ret = PTR_ERR(ac_draw);
 	}
 
 	if (pdata->is_ac_online) {

             reply	other threads:[~2010-08-23 21:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 21:21 Dan Carpenter [this message]
2010-08-23 21:39 ` [patch] pda_power: remove unneeded assignment Daniel Mack

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=20100823212103.GA7340@bicker \
    --to=error27@gmail.com \
    --cc=cbouatmailru@gmail.com \
    --cc=daniel@caiaq.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox