Commit e1af5c8
leds: is31fl319x: Fix devm vs. non-devm ordering
When non-devm resources are allocated they mustn't be followed by
devm allocations, otherwise it will break the tear down ordering
and might lead to crashes or other bugs during ->remove() stage.
Fix this by wrapping mutex_destroy() call with
devm_add_action_or_reset().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>1 parent 0d77252 commit e1af5c8
1 file changed
Lines changed: 9 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
514 | 517 | | |
515 | 518 | | |
516 | 519 | | |
517 | | - | |
| 520 | + | |
518 | 521 | | |
519 | 522 | | |
520 | 523 | | |
| |||
524 | 527 | | |
525 | 528 | | |
526 | 529 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 530 | + | |
| 531 | + | |
531 | 532 | | |
532 | 533 | | |
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
| 537 | + | |
| 538 | + | |
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
| |||
568 | 567 | | |
569 | 568 | | |
570 | 569 | | |
571 | | - | |
| 570 | + | |
572 | 571 | | |
573 | 572 | | |
574 | 573 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | 574 | | |
588 | 575 | | |
589 | 576 | | |
| |||
611 | 598 | | |
612 | 599 | | |
613 | 600 | | |
614 | | - | |
615 | 601 | | |
616 | 602 | | |
617 | 603 | | |
| |||
0 commit comments