summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-05-11 10:06:24 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-05-11 10:09:02 +0200
commitd528a3bbe6417c569342e5f0861e11c4092ecf36 (patch)
tree9212af9dfe4c0b5e377edd9ff88d2b6ebd8a0d51
parente648666112e7e99de621277e7c895a0341bd3c9d (diff)
downloadbarebox-d528a3bbe6417c569342e5f0861e11c4092ecf36.tar.gz
barebox-d528a3bbe6417c569342e5f0861e11c4092ecf36.tar.xz
state: remove unused variables
There's no need to check for the existence of the backend property as this is done implicitly later anyway. With this check removed of_path is only assigned, but never used. Remove the unused code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/state/state.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/common/state/state.c b/common/state/state.c
index b4a634fa99..878fd1b0fb 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -570,10 +570,8 @@ struct state *state_new_from_node(struct device_node *node, char *path,
{
struct state *state;
int ret = 0;
- int len;
const char *backend_type;
const char *storage_type;
- const char *of_path;
const char *alias;
uint32_t stridesize;
@@ -587,12 +585,6 @@ struct state *state_new_from_node(struct device_node *node, char *path,
if (IS_ERR(state))
return state;
- of_path = of_get_property(node, "backend", &len);
- if (!of_path) {
- ret = -ENODEV;
- goto out_release_state;
- }
-
if (!path) {
struct device_node *partition_node;
@@ -603,7 +595,6 @@ struct state *state_new_from_node(struct device_node *node, char *path,
goto out_release_state;
}
- of_path = partition_node->full_name;
ret = of_find_path_by_node(partition_node, &path, 0);
if (ret) {
if (ret != -EPROBE_DEFER)