summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-sun6i-p2wi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-sun6i-p2wi.c')
-rw-r--r--drivers/i2c/busses/i2c-sun6i-p2wi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c
index 7c07ce116..540c33f4e 100644
--- a/drivers/i2c/busses/i2c-sun6i-p2wi.c
+++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c
@@ -202,6 +202,11 @@ static int p2wi_probe(struct platform_device *pdev)
return -EINVAL;
}
+ if (clk_freq == 0) {
+ dev_err(dev, "clock-frequency is set to 0 in DT\n");
+ return -EINVAL;
+ }
+
if (of_get_child_count(np) > 1) {
dev_err(dev, "P2WI only supports one slave device\n");
return -EINVAL;