diff mbox

[3/4,media] ov2640: Propagate the real error on devm_clk_get() failure

Message ID 1503851438-4949-3-git-send-email-festevam@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Aug. 27, 2017, 4:30 p.m. UTC
From: Fabio Estevam <fabio.estevam@nxp.com>

devm_clk_get() may return different error codes other than -EPROBE_DEFER,
so it is better to return the real error code instead.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 drivers/media/i2c/ov2640.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c
index e6d0c1f..e6cbe01 100644
--- a/drivers/media/i2c/ov2640.c
+++ b/drivers/media/i2c/ov2640.c
@@ -1107,7 +1107,7 @@  static int ov2640_probe(struct i2c_client *client,
 	if (client->dev.of_node) {
 		priv->clk = devm_clk_get(&client->dev, "xvclk");
 		if (IS_ERR(priv->clk))
-			return -EPROBE_DEFER;
+			return PTR_ERR(priv->clk);
 		clk_prepare_enable(priv->clk);
 	}