mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
platform/chrome: cros_ec_debugfs: Clean up console log on probe failure
Add a dedicated error label for failures after successful console log
setup.
Fixes: d90fa2c64d ("platform/chrome: cros_ec: Poll EC log on EC panic")
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
Link: https://lore.kernel.org/r/c00974953a1b952f51f0f021d7f9fad134159909.1785320940.git.getshell@seu.edu.cn
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
This commit is contained in:
parent
17376e7311
commit
5d187600c4
|
|
@ -513,7 +513,7 @@ static int cros_ec_debugfs_probe(struct platform_device *pd)
|
|||
ret = blocking_notifier_chain_register(&ec->ec_dev->panic_notifier,
|
||||
&debug_info->notifier_panic);
|
||||
if (ret)
|
||||
goto remove_debugfs;
|
||||
goto cleanup_console_log;
|
||||
|
||||
ec->debug_info = debug_info;
|
||||
|
||||
|
|
@ -521,6 +521,8 @@ static int cros_ec_debugfs_probe(struct platform_device *pd)
|
|||
|
||||
return 0;
|
||||
|
||||
cleanup_console_log:
|
||||
cros_ec_cleanup_console_log(debug_info);
|
||||
remove_debugfs:
|
||||
debugfs_remove_recursive(debug_info->dir);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user