Commit 4c1206dd authored by 蒋家盛's avatar 蒋家盛 Committed by Jialin Zhang
Browse files

mfd: sm501: Add check for platform_driver_register()

stable inclusion
from stable-v5.10.150
commit 6e58f2469ec5c3a4325bbeec0b0bd3e37d21e138
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6e58f2469ec5c3a4325bbeec0b0bd3e37d21e138



--------------------------------

[ Upstream commit 8325a6c2 ]

As platform_driver_register() can return error numbers,
it should be better to check platform_driver_register()
and deal with the exception.

Fixes: b6d6454f ("[PATCH] mfd: SM501 core driver")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220913091112.1739138-1-jiasheng@iscas.ac.cn


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent fd2627a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment