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

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
......@@ -1747,14 +1747,10 @@ 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);
of_node_put(remote_ep);
of_node_put(sensor_node);
of_node_put(ep_node);
of_node_put(port);
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