i2c: Fix return value of bcm_kona_i2c_probe()
PATCH 1/1 i2c: Fix return value of bcm_kona_i2c_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 <[email protected]>
--- drivers/i2c/busses/i2c-bcm-kona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-bcm-kona.c +1 -1
@@ -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 );
Signature · 1 line
2.20.1
Quoted 4 lines · zhaoxiao
When call function
devm_platform_ioremap_resource(), we should useIS_ERR()to check the return value and returnPTR_ERR()if failed.Signed-off-by zhaoxiao <[email protected]>
Acked-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian
Wolfram Sang
AppliedQuoted 4 lines · zhaoxiao
When call function
devm_platform_ioremap_resource(), we should useIS_ERR()to check the return value and returnPTR_ERR()if failed.Signed-off-by zhaoxiao <[email protected]>
Applied to for-next, thanks!