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: zhong jiang <zhongjiang@huawei.com> Reviewed-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Родитель
94a426c564
Коммит
58513d4849
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче