diff options
| author | Yuho Choi <dbgh9129@gmail.com> | 2026-08-07 16:45:50 -0400 |
|---|---|---|
| committer | Richard Weinberger <richard@nod.at> | 2026-08-12 00:06:36 +0200 |
| commit | 31dd710cd84d5dd63c49f640d3a9f36c9699ca95 (patch) | |
| tree | b6d30d5fc5394bb780d39f8e2243b4bfd6969ee4 /scripts/const_structs.checkpatch | |
| parent | 5b0a6b554e12a97f9771a9a9f4ea1f5457373c73 (diff) | |
| download | linux-31dd710cd84d5dd63c49f640d3a9f36c9699ca95.tar.gz linux-31dd710cd84d5dd63c49f640d3a9f36c9699ca95.zip | |
mtd: ubi: Release device reference on busy detach
ubi_detach_mtd_dev() obtains a device reference through ubi_get_device()
before checking whether the UBI device is busy. The busy return path drops
ubi->ref_count but leaves the device reference held, so the device object
cannot be released after a later detach.
Drop the device reference before returning -EBUSY.
Fixes: 7e84c961b2eb ("mtd: ubi: introduce pre-removal notification for UBI volumes")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions
