Commit 58513d48 authored by zhong jiang's avatar zhong jiang Committed by Mauro Carvalho Chehab
Browse files

media: platform: 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>
Reviewed-by: default avatarBenoit Parrot <bparrot@ti.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 94a426c5
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1747,13 +1747,9 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
	}

cleanup_exit:
	if (remote_ep)
	of_node_put(remote_ep);
	if (sensor_node)
	of_node_put(sensor_node);
	if (ep_node)
	of_node_put(ep_node);
	if (port)
	of_node_put(port);

	return ret;