From: Arvind Yadav Date: Mon, 5 Jun 2017 12:06:28 +0000 (+0530) Subject: spi: davinci: Handle return value of clk_prepare_enable X-Git-Tag: v4.13-rc1~175^2~3^4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35fc3b9ff66b907ca7a75c971decf291adf78131;p=thirdparty%2Flinux.git spi: davinci: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 0b4493e7fe9e7..6ddb6ef1fda4f 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -964,7 +964,9 @@ static int davinci_spi_probe(struct platform_device *pdev) ret = -ENODEV; goto free_master; } - clk_prepare_enable(dspi->clk); + ret = clk_prepare_enable(dspi->clk); + if (ret) + goto free_master; master->dev.of_node = pdev->dev.of_node; master->bus_num = pdev->id;