[PATCH] memory: of_memory.c: remove unnecessary initialization

From: Cong Ding
Date: Tue Dec 04 2012 - 06:28:38 EST


the initialization of variable ret is unnecessary, we can remove it while save
one time "or" operation.

Signed-off-by: Cong Ding <dinggnu@xxxxxxxxx>
---
drivers/memory/of_memory.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index 6007435..c59a946 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -30,14 +30,14 @@
const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
struct device *dev)
{
- int ret = 0;
+ int ret;
struct lpddr2_min_tck *min;

min = devm_kzalloc(dev, sizeof(*min), GFP_KERNEL);
if (!min)
goto default_min_tck;

- ret |= of_property_read_u32(np, "tRPab-min-tck", &min->tRPab);
+ ret = of_property_read_u32(np, "tRPab-min-tck", &min->tRPab);
ret |= of_property_read_u32(np, "tRCD-min-tck", &min->tRCD);
ret |= of_property_read_u32(np, "tWR-min-tck", &min->tWR);
ret |= of_property_read_u32(np, "tRASmin-min-tck", &min->tRASmin);
--
1.7.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/