Commit 802dcaf
xhci: Fix null pointer dereference in resume if xhci has only one roothub
In the re-init path xhci_resume() passes 'hcd->primary_hcd' to hci_init(),
however this field isn't initialized by __usb_create_hcd() for a HCD
without secondary controller.
xhci_resume() is called once per xHC device, not per hcd, so the extra
checking for primary hcd can be removed.
Fixes: e0fe986 ("usb: host: xhci-plat: prepare operation w/o shared hcd")
Reported-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220610115338.863152-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 8bd6b8c commit 802dcaf
1 file changed
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | | - | |
1111 | 1110 | | |
1112 | 1111 | | |
1113 | 1112 | | |
| |||
1214 | 1213 | | |
1215 | 1214 | | |
1216 | 1215 | | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | 1216 | | |
1223 | | - | |
| 1217 | + | |
1224 | 1218 | | |
1225 | 1219 | | |
1226 | 1220 | | |
1227 | 1221 | | |
1228 | 1222 | | |
1229 | | - | |
1230 | | - | |
| 1223 | + | |
| 1224 | + | |
1231 | 1225 | | |
1232 | | - | |
| 1226 | + | |
1233 | 1227 | | |
| 1228 | + | |
1234 | 1229 | | |
1235 | 1230 | | |
1236 | 1231 | | |
| |||
0 commit comments