Commit 520886a
mtd: nand: Use scoped_guard for mutex in nand_resume
Refactor nand_resume() to use scoped_guard() instead of explicit
mutex_lock/unlock. This improves code safety by ensuring the mutex
is always released through the RAII-based cleanup infrastructure.
The behavior is functionally equivalent. The mutex is released at the
end of the scoped block, after which wake_up_all() is called to
preserve the original locking semantics.
Signed-off-by: Richard Lyu <richard.lyu@suse.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>1 parent d9a2a92 commit 520886a
1 file changed
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
4704 | 4705 | | |
4705 | 4706 | | |
4706 | 4707 | | |
4707 | | - | |
4708 | | - | |
4709 | | - | |
4710 | | - | |
4711 | | - | |
4712 | | - | |
4713 | | - | |
4714 | | - | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
| 4713 | + | |
| 4714 | + | |
| 4715 | + | |
| 4716 | + | |
4715 | 4717 | | |
4716 | | - | |
4717 | 4718 | | |
4718 | 4719 | | |
4719 | 4720 | | |
| |||
0 commit comments