Messages in this thread Patch in this message | | | From | Cong Ding <> | Subject | [PATCH] memory: of_memory.c: remove unnecessary initialization | Date | Tue, 4 Dec 2012 11:26:59 +0000 |
| |
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
| |