i2c: bcm-kona: Fix return value in probe()
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: zhaoxiao <long870912@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
Родитель
e7f4264821
Коммит
ed2f85115a
|
@ -763,7 +763,7 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
|
|||
/* Map hardware registers */
|
||||
dev->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(dev->base))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(dev->base);
|
||||
|
||||
/* Get and enable external clock */
|
||||
dev->external_clk = devm_clk_get(dev->device, NULL);
|
||||
|
|
Загрузка…
Ссылка в новой задаче