mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
i2c: npcm7xx: Add check for platform_driver_register
[ Upstream commit6ba12b56b9] As platform_driver_register() could fail, it should be better to deal with the return value in order to maintain the code consisitency. Fixes:56a1485b10("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Acked-by: Tali Perry <tali.perry1@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b559ef9dfc
commit
716587a57a
|
|
@ -2369,8 +2369,7 @@ static struct platform_driver npcm_i2c_bus_driver = {
|
||||||
static int __init npcm_i2c_init(void)
|
static int __init npcm_i2c_init(void)
|
||||||
{
|
{
|
||||||
npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL);
|
npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL);
|
||||||
platform_driver_register(&npcm_i2c_bus_driver);
|
return platform_driver_register(&npcm_i2c_bus_driver);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
module_init(npcm_i2c_init);
|
module_init(npcm_i2c_init);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user