Commit 3104389e authored by zhong jiang's avatar zhong jiang Committed by Greg Kroah-Hartman

misc: sram: remove redundant null pointer check before of_node_put

of_node_put has taken the null pinter check into account. So it is
safe to remove the duplicated check before of_node_put.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7153d9af
......@@ -323,10 +323,8 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)
cur_start = block->start + block->size;
}
err_chunks:
if (child)
of_node_put(child);
err_chunks:
of_node_put(child);
kfree(rblocks);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment