diff mbox

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

Message ID CAPgLHd8vdQL5Uyypjj_L9qg=abQEXoGc6ZBKwrF-5D9x2YNm-Q@mail.gmail.com
State Accepted
Headers show

Commit Message

Wei Yongjun Nov. 18, 2013, 1:03 p.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/i2c/busses/i2c-bcm-kona.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tim Kryger Nov. 18, 2013, 5:05 p.m. UTC | #1
On Mon, Nov 18, 2013 at 5:03 AM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
> ---
>  drivers/i2c/busses/i2c-bcm-kona.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c
> index 865e5dd..036cf03 100644
> --- a/drivers/i2c/busses/i2c-bcm-kona.c
> +++ b/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 */
>

Looks good.  Thanks.

Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang Nov. 18, 2013, 7:26 p.m. UTC | #2
On Mon, Nov 18, 2013 at 09:03:08PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> 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>

Applied to for-next, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c
index 865e5dd..036cf03 100644
--- a/drivers/i2c/busses/i2c-bcm-kona.c
+++ b/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 */