Эх сурвалжийг харах

i2c: bcm-kona: fix error return code in bcm_kona_i2c_probe()

Fix to return a negative error code from the bus speed parse
error handling case instead of 0.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Wei Yongjun 11 жил өмнө
parent
commit
cfff1f4a93

+ 2 - 1
drivers/i2c/busses/i2c-bcm-kona.c

@@ -792,7 +792,8 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
 	}
 
 	/* Parse bus speed */
-	if (bcm_kona_i2c_assign_bus_speed(dev))
+	rc = bcm_kona_i2c_assign_bus_speed(dev);
+	if (rc)
 		goto probe_disable_clk;
 
 	/* Enable internal clocks */