firmware: fix capturing errors on fw_cache_init() on early init
register_pm_notifier() can technically fail, caputure this. Note that register_syscore_ops() cannot fail given it just adds an element to a linked list. This has been broken since v3.7. Chances of this failing however are slim. To improve code readability move the code folded under CONFIG_PM_SLEEP into a helper. Fixes: 07646d9c ("firmware loader: cache devices firmware during suspend/resume cycle") Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录