Commit 32dbfb4
i2c: diolan-u2c: drop redundant device reference
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>1 parent 7bc4c8f commit 32dbfb4
1 file changed
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | 430 | | |
437 | 431 | | |
438 | 432 | | |
| |||
453 | 447 | | |
454 | 448 | | |
455 | 449 | | |
456 | | - | |
| 450 | + | |
457 | 451 | | |
458 | 452 | | |
459 | 453 | | |
| |||
488 | 482 | | |
489 | 483 | | |
490 | 484 | | |
491 | | - | |
| 485 | + | |
492 | 486 | | |
493 | 487 | | |
494 | 488 | | |
| |||
499 | 493 | | |
500 | 494 | | |
501 | 495 | | |
502 | | - | |
| 496 | + | |
503 | 497 | | |
504 | 498 | | |
505 | 499 | | |
| |||
0 commit comments