Skip to content
Commit 422ae7d9 authored by Andre Kalb's avatar Andre Kalb Committed by Jakub Kicinski
Browse files

net: phy: dp83822: Fix null pointer access on DP83825/DP83826 devices

The probe() function is only used for the DP83822 PHY, leaving the
private data pointer uninitialized for the smaller DP83825/26 models.
While all uses of the private data structure are hidden in 82822 specific
callbacks, configuring the interrupt is shared across all models.
This causes a NULL pointer dereference on the smaller PHYs as it accesses
the private data unchecked. Verifying the pointer avoids that.

Fixes: 5dc39fd5

 ("net: phy: DP83822: Add ability to advertise Fiber connection")
Signed-off-by: default avatarAndre Kalb <andre.kalb@sma.de>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/Y9FzniUhUtbaGKU7@pc6682


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 29de68c2
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