Commit b52ca79
usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in the error path of .probe()
BugLink: https://bugs.launchpad.net/bugs/2106770
commit 74adad5 upstream.
Current implementation of ci_hdrc_imx_driver does not decrement the
refcount of the device obtained in usbmisc_get_init_data(). Add a
put_device() call in .remove() and in .probe() before returning an
error.
This bug was found by an experimental static analysis tool that I am
developing.
Cc: stable <stable@kernel.org>
Fixes: f40017e ("chipidea: usbmisc_imx: Add USB support for VF610 SoCs")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20241216015539.352579-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>1 parent dd50401 commit b52ca79
1 file changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
| 373 | + | |
| 374 | + | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
381 | 383 | | |
382 | | - | |
383 | | - | |
| 384 | + | |
| 385 | + | |
384 | 386 | | |
| 387 | + | |
| 388 | + | |
385 | 389 | | |
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
390 | 394 | | |
391 | | - | |
| 395 | + | |
392 | 396 | | |
393 | 397 | | |
394 | 398 | | |
| |||
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
405 | | - | |
| 409 | + | |
| 410 | + | |
406 | 411 | | |
407 | 412 | | |
408 | 413 | | |
409 | 414 | | |
410 | 415 | | |
411 | | - | |
| 416 | + | |
412 | 417 | | |
413 | 418 | | |
414 | 419 | | |
| |||
417 | 422 | | |
418 | 423 | | |
419 | 424 | | |
420 | | - | |
| 425 | + | |
| 426 | + | |
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
| |||
527 | 533 | | |
528 | 534 | | |
529 | 535 | | |
| 536 | + | |
| 537 | + | |
530 | 538 | | |
531 | 539 | | |
532 | 540 | | |
| |||
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
| 562 | + | |
554 | 563 | | |
555 | 564 | | |
556 | 565 | | |
| |||
0 commit comments