Re: [PATCH 2/2] drm: bridge: it66121: fix a resource leak in probe

2021-05-17 Thread Neil Armstrong
On 15/05/2021 11:50, Dan Carpenter wrote: > In the original code if the "ctx = devm_kzalloc()" allocation failed > then we should have called of_node_put(ep); before returning. It's > actually a bit easier to do the allocation first before assigning > ep = of_graph_get_endpoint_by_regs(). > > Fix

[PATCH 2/2] drm: bridge: it66121: fix a resource leak in probe

2021-05-15 Thread Dan Carpenter
In the original code if the "ctx = devm_kzalloc()" allocation failed then we should have called of_node_put(ep); before returning. It's actually a bit easier to do the allocation first before assigning ep = of_graph_get_endpoint_by_regs(). Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver") S