aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk/hisilicon/clk-hi3660-stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/hisilicon/clk-hi3660-stub.c')
-rw-r--r--drivers/clk/hisilicon/clk-hi3660-stub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/hisilicon/clk-hi3660-stub.c b/drivers/clk/hisilicon/clk-hi3660-stub.c
index 9b6c72bbddf9..e8b2c43b1bb8 100644
--- a/drivers/clk/hisilicon/clk-hi3660-stub.c
+++ b/drivers/clk/hisilicon/clk-hi3660-stub.c
@@ -149,6 +149,8 @@ static int hi3660_stub_clk_probe(struct platform_device *pdev)
return PTR_ERR(stub_clk_chan.mbox);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -EINVAL;
freq_reg = devm_ioremap(dev, res->start, resource_size(res));
if (!freq_reg)
return -ENOMEM;