mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: da9063: fix assignment of da9063_reg_matches to NULL
@ 2014-03-11 11:25 Colin King
  2014-03-11 19:05 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2014-03-11 11:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

cppcheck detected an incorrect assignment:

 drivers/regulator/da9063-regulator.c:711]: (warning) Assignment
 of function parameter has no effect outside the function

the original code didn't do anything, instead, *da9063_reg_matches
needs to be set to NULL.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/regulator/da9063-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index 91e99a2..d3ccd54 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -710,7 +710,7 @@ static struct da9063_regulators_pdata *da9063_parse_regulators_dt(
 		struct platform_device *pdev,
 		struct of_regulator_match **da9063_reg_matches)
 {
-	da9063_reg_matches = NULL;
+	*da9063_reg_matches = NULL;
 	return ERR_PTR(-ENODEV);
 }
 #endif
-- 
1.9.0


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

* Re: [PATCH] regulator: da9063: fix assignment of da9063_reg_matches to NULL
  2014-03-11 11:25 [PATCH] regulator: da9063: fix assignment of da9063_reg_matches to NULL Colin King
@ 2014-03-11 19:05 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-03-11 19:05 UTC (permalink / raw)
  To: Colin King; +Cc: Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

On Tue, Mar 11, 2014 at 11:25:09AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> cppcheck detected an incorrect assignment:

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2014-03-11 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 11:25 [PATCH] regulator: da9063: fix assignment of da9063_reg_matches to NULL Colin King
2014-03-11 19:05 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®