diff options
| author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2025-11-25 13:48:47 +0200 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2025-12-23 23:11:06 +0530 |
| commit | aecea96492f52364f852248055921c1b3aacbc91 (patch) | |
| tree | b8ac9e878730e2ded7d15e47cb3eaf544efae7f3 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 04dceaa3c97d3cdc51e1d78dce32ed7388872d07 (diff) | |
phy: lynx-28g: improve lynx_28g_probe() sequence
dev_set_drvdata() is called twice, it is sufficient to do it only once.
devm_of_phy_provider_register() can fail, and if it does, the
&priv->cdr_check work item is queued, but not cancelled, and the device
probing failed, so it will trigger use after free. This is a minor risk
though.
Resource initialization should be done a little earlier, in case we need
to dereference dev_get_drvdata() in lynx_28g_pll_read_configuration() or
in lynx_28g_lane_read_configuration().
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251125114847.804961-16-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
