lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100823212103.GA7340@bicker>
Date:	Mon, 23 Aug 2010 23:21:03 +0200
From:	Dan Carpenter <error27@...il.com>
To:	Anton Vorontsov <cbouatmailru@...il.com>
Cc:	Daniel Mack <daniel@...aq.de>, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [patch] pda_power: remove unneeded assignment

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@...il.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) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ