mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
staging: fbtft: Fix error path in fbtft_driver_module_init()
[ Upstream commit 426aca16e903b387a0b0001d62207a745c67cfd3 ]
If registering the platform driver fails, the function must not return
without undoing the spi driver registration first.
Fixes: c296d5f995 ("staging: fbtft: core support")
Signed-off-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
2650ed4707
commit
94888cf755
1 changed files with 4 additions and 1 deletions
|
|
@ -332,7 +332,10 @@ static int __init fbtft_driver_module_init(void) \
|
|||
ret = spi_register_driver(&fbtft_driver_spi_driver); \
|
||||
if (ret < 0) \
|
||||
return ret; \
|
||||
return platform_driver_register(&fbtft_driver_platform_driver); \
|
||||
ret = platform_driver_register(&fbtft_driver_platform_driver); \
|
||||
if (ret < 0) \
|
||||
spi_unregister_driver(&fbtft_driver_spi_driver); \
|
||||
return ret; \
|
||||
} \
|
||||
\
|
||||
static void __exit fbtft_driver_module_exit(void) \
|
||||
|
|
|
|||
Loading…
Reference in a new issue