diff options
author | Mark Brown <broonie@kernel.org> | 2018-10-01 12:14:22 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-10-01 12:14:22 +0100 |
commit | 2dbd82149fa9038aa1de47432a80c56761243a1a (patch) | |
tree | b66dd581dbe2e48ad132fa31775e0b7936af0853 /drivers/rtc/rtc-bq4802.c | |
parent | 92b425c4f1f9b97b9a93b5b38d12b865f46ce6b6 (diff) | |
parent | c6ee9e74b237b01d0a4988de41acbf569fdb8974 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-rt
Diffstat (limited to 'drivers/rtc/rtc-bq4802.c')
-rw-r--r-- | drivers/rtc/rtc-bq4802.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-bq4802.c b/drivers/rtc/rtc-bq4802.c index bd170cb3361c..5747a54cbd42 100644 --- a/drivers/rtc/rtc-bq4802.c +++ b/drivers/rtc/rtc-bq4802.c @@ -164,6 +164,10 @@ static int bq4802_probe(struct platform_device *pdev) } else if (p->r->flags & IORESOURCE_MEM) { p->regs = devm_ioremap(&pdev->dev, p->r->start, resource_size(p->r)); + if (!p->regs){ + err = -ENOMEM; + goto out; + } p->read = bq4802_read_mem; p->write = bq4802_write_mem; } else { |