Commit 3f62ea5
net: phy: dp83822: Fix NULL pointer dereference on DP83825 devices
The probe() function is only used for DP83822 and DP83826 PHY,
leaving the private data pointer uninitialized for the DP83825 models
which causes a NULL pointer dereference in the recently introduced/changed
functions dp8382x_config_init() and dp83822_set_wol().
Add the dp8382x_probe() function, so all PHY models will have a valid
private data pointer to fix this issue and also prevent similar issues
in the future.
Fixes: 9ef9ecf ("net: phy: dp8382x: keep WOL settings across suspends")
Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/66w.ZbGt.65Ljx42yHo5.1csjxu@seznam.cz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 48aa361 commit 3f62ea5
1 file changed
Lines changed: 22 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
| 274 | + | |
276 | 275 | | |
277 | 276 | | |
278 | 277 | | |
| |||
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
295 | | - | |
296 | | - | |
| 294 | + | |
297 | 295 | | |
298 | 296 | | |
299 | 297 | | |
| |||
691 | 689 | | |
692 | 690 | | |
693 | 691 | | |
694 | | - | |
| 692 | + | |
695 | 693 | | |
696 | 694 | | |
697 | | - | |
698 | 695 | | |
699 | 696 | | |
700 | 697 | | |
| |||
703 | 700 | | |
704 | 701 | | |
705 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
706 | 717 | | |
707 | 718 | | |
708 | 719 | | |
| |||
717 | 728 | | |
718 | 729 | | |
719 | 730 | | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
| 731 | + | |
726 | 732 | | |
727 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
728 | 736 | | |
729 | 737 | | |
730 | 738 | | |
| |||
795 | 803 | | |
796 | 804 | | |
797 | 805 | | |
| 806 | + | |
798 | 807 | | |
799 | 808 | | |
800 | 809 | | |
| |||
0 commit comments