summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-01-15 14:51:46 +0300
committerVinod Koul <vkoul@kernel.org>2022-01-24 09:35:31 +0530
commit29afbd769ca338fa14cbfbbc824f7dc457ed7f2e (patch)
tree7eadebf507bee603c9a8a47e0f9e2f7257983acb /samples
parent6d1e6bcb31663ee83aaea1f171f3dbfe95dd4a69 (diff)
phy: cadence: Sierra: fix error handling bugs in probe()
There are two bugs in the error handling: 1: If devm_of_phy_provider_register() fails then there was no cleanup. 2: The error handling called of_node_put(child) improperly leading to a use after free. We are only holding the reference inside the loop so the last two gotos after the loop lead to a use after free bug. Fix this by cleaning up the partial allocations (or partial iterations) in the loop before doing the goto. Fixes: a43f72ae136a ("phy: cadence: Sierra: Change MAX_LANES of Sierra to 16") Fixes: 44d30d622821 ("phy: cadence: Add driver for Sierra PHY") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220115115146.GC7552@kili Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions