|
@@ -481,6 +481,10 @@ static int uniphier_fi2c_clk_init(struct device *dev,
|
|
|
return ret;
|
|
|
|
|
|
clk_rate = clk_get_rate(priv->clk);
|
|
|
+ if (!clk_rate) {
|
|
|
+ dev_err(dev, "input clock rate should not be zero\n");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
|
|
|
uniphier_fi2c_reset(priv);
|
|
|
|
|
@@ -531,7 +535,7 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)
|
|
|
|
|
|
ret = uniphier_fi2c_clk_init(dev, priv);
|
|
|
if (ret)
|
|
|
- return ret;
|
|
|
+ goto err;
|
|
|
|
|
|
ret = devm_request_irq(dev, irq, uniphier_fi2c_interrupt, 0,
|
|
|
pdev->name, priv);
|