]> git.baikalelectronics.ru Git - kernel.git/commit
m68k: virt: Fix missing platform_device_unregister() on error in virt_platform_init()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 28 Jun 2022 08:49:03 +0000 (16:49 +0800)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 6 Jul 2022 12:07:04 +0000 (14:07 +0200)
commita3360ef983833ba13a54509bd81144f00139ec41
tree30b8b5c1f903c1f424756c6b01f332d870bc63b5
parent7b0d8ef46d708ce084e0f514419e617fcee2eca2
m68k: virt: Fix missing platform_device_unregister() on error in virt_platform_init()

Add the missing platform_device_unregister() before return
from virt_platform_init() in the error handling case.

Fixes: be688792e5ca ("m68k: Introduce a virtual m68k machine")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Link: https://lore.kernel.org/r/20220628084903.3147123-1-yangyingliang@huawei.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/virt/platform.c