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

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
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -324,9 +324,7 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)
	}

err_chunks:
	if (child)
	of_node_put(child);

	kfree(rblocks);

	return ret;