Skip to content

Commit

Permalink
i2c: bcm-kona: fix error return code in bcm_kona_i2c_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Wolfram Sang committed Nov 18, 2013
1 parent 5e47eec commit cfff1f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/i2c/busses/i2c-bcm-kona.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit cfff1f4

Please sign in to comment.