Commit 1e876e5
gpio: mpsse: fix reference leak in gpio_mpsse_probe() error paths
The reference obtained by calling usb_get_dev() is not released in the
gpio_mpsse_probe() error paths. Fix that by using device managed helper
functions. Also remove the usb_put_dev() call in the disconnect function
since now it will be released automatically.
Cc: [email protected]
Fixes: c46a74f ("gpio: add support for FTDI's MPSSE as GPIO")
Signed-off-by: Abdun Nihaal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>1 parent 014a17d commit 1e876e5
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
551 | 558 | | |
552 | 559 | | |
553 | 560 | | |
| |||
592 | 599 | | |
593 | 600 | | |
594 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
595 | 606 | | |
596 | 607 | | |
597 | 608 | | |
| |||
713 | 724 | | |
714 | 725 | | |
715 | 726 | | |
716 | | - | |
717 | 727 | | |
718 | 728 | | |
719 | 729 | | |
| |||
0 commit comments