Message ID | 1467989201-14661-5-git-send-email-andi.shyti@samsung.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 25981d8281ee4cbbd6f7c5bc0f8c048ad9548037 |
Headers | show |
On Fri, Jul 08, 2016 at 11:46:38PM +0900, Andi Shyti wrote: > If clk_prepare_enable() fails do not return -EBUSY but use the > value provided by the function itself. > > Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> > Signed-off-by: Andi Shyti <andi.shyti@samsung.com> > --- > drivers/spi/spi-s3c64xx.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Cool, thanks for fixing existing pattern: Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 0784a4d..3a65adf 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1126,9 +1126,9 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) goto err_deref_master; } - if (clk_prepare_enable(sdd->clk)) { + ret = clk_prepare_enable(sdd->clk); + if (ret) { dev_err(&pdev->dev, "Couldn't enable clock 'spi'\n"); - ret = -EBUSY; goto err_deref_master; } @@ -1141,9 +1141,9 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) goto err_disable_clk; } - if (clk_prepare_enable(sdd->src_clk)) { + ret = clk_prepare_enable(sdd->src_clk); + if (ret) { dev_err(&pdev->dev, "Couldn't enable clock '%s'\n", clk_name); - ret = -EBUSY; goto err_disable_clk; }
If clk_prepare_enable() fails do not return -EBUSY but use the value provided by the function itself. Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Andi Shyti <andi.shyti@samsung.com> --- drivers/spi/spi-s3c64xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)