All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reset: remove unnecessary local variable initialization from of_reset_control_get_by_index
@ 2015-12-09  7:59 Philipp Zabel
  0 siblings, 0 replies; only message in thread
From: Philipp Zabel @ 2015-12-09  7:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernel, Philipp Zabel

There is no need to initialize rstc, as it is unconditionally
assigned the return value of a kzalloc call before use.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/reset/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 8737663..4a63b37 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -152,7 +152,7 @@ EXPORT_SYMBOL_GPL(reset_control_status);
 struct reset_control *of_reset_control_get_by_index(struct device_node *node,
 					   int index)
 {
-	struct reset_control *rstc = ERR_PTR(-EPROBE_DEFER);
+	struct reset_control *rstc;
 	struct reset_controller_dev *r, *rcdev;
 	struct of_phandle_args args;
 	int rstc_id;
-- 
2.6.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-09  7:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09  7:59 [PATCH] reset: remove unnecessary local variable initialization from of_reset_control_get_by_index Philipp Zabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.