i2c: npcm7xx: Add check for platform_driver_register
stable inclusion from stable-v5.10.124 commit 716587a57a284ab1813838fb1c563fa3ed2bf902 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6E7 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=716587a57a284ab1813838fb1c563fa3ed2bf902 -------------------------------- [ Upstream commit 6ba12b56 ] As platform_driver_register() could fail, it should be better to deal with the return value in order to maintain the code consisitency. Fixes: 56a1485b ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: NJiasheng Jiang <jiasheng@iscas.ac.cn> Acked-by: NTali Perry <tali.perry1@gmail.com> Signed-off-by: NWolfram Sang <wsa@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
Showing
想要评论请 注册 或 登录