kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] pda_power: remove unneeded assignment
@ 2010-08-23 21:21 Dan Carpenter
  2010-08-23 21:39 ` Daniel Mack
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-08-23 21:21 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: Daniel Mack, linux-kernel, kernel-janitors

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) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-23 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-23 21:21 [patch] pda_power: remove unneeded assignment Dan Carpenter
2010-08-23 21:39 ` Daniel Mack

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).