lkml.org 
[lkml]   [2012]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] memory: of_memory.c: remove unnecessary initialization
Date
the initialization of variable ret is unnecessary, we can remove it while save
one time "or" operation.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
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


\
 
 \ /
  Last update: 2012-12-04 13:01    [W:0.053 / U:1.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site