Commit d9bc625
wifi: mt76: mt7996: prevent uninit return in mt7996_mac_sta_add_links
If link_conf_dereference_protected() or mt7996_vif_link()
or link_sta_dereference_protected() fail the code jumps to
the error_unlink label and returns ret which is uninitialised.
Fix this by setting err before jumping to error_unlink.
Fixes: c7e4fc3 ("wifi: mt76: mt7996: Update mt7996_mcu_add_sta to MLO support")
Fixes: dd82a9e ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks")
Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Link: https://patch.msgid.link/20250421110550.9839-1-qasdev00@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>1 parent 3dbfb8a commit d9bc625
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
1001 | | - | |
| 1001 | + | |
| 1002 | + | |
1002 | 1003 | | |
| 1004 | + | |
1003 | 1005 | | |
1004 | 1006 | | |
1005 | | - | |
| 1007 | + | |
| 1008 | + | |
1006 | 1009 | | |
| 1010 | + | |
1007 | 1011 | | |
1008 | 1012 | | |
1009 | | - | |
| 1013 | + | |
| 1014 | + | |
1010 | 1015 | | |
| 1016 | + | |
1011 | 1017 | | |
1012 | 1018 | | |
1013 | 1019 | | |
| |||
0 commit comments