aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-bq4802.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-10-01 12:14:51 +0100
committerMark Brown <broonie@kernel.org>2018-10-01 12:14:51 +0100
commitc46dfa3b9768d6cd6c5fd562bdaa371a172a6c00 (patch)
treed6a2f6732b08831b7036c5e15499aadc858a648f /drivers/rtc/rtc-bq4802.c
parent827ca3b0b92946f4dbf2b6178035163016a12cec (diff)
parent46f9f7c3c326389d5765c28f120fead6cc068e67 (diff)
Merge tag 'v4.9.130' into linux-linaro-lsk-v4.9lsk-v4.9-18.09
This is the 4.9.130 stable release # gpg: Signature made Sat 29 Sep 2018 11:07:36 BST # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Good signature from "Greg Kroah-Hartman <gregkh@linuxfoundation.org>" [unknown] # gpg: aka "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>" [unknown] # gpg: aka "Greg Kroah-Hartman <gregkh@kernel.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 647F 2865 4894 E3BD 4571 99BE 38DB BDC8 6092 693E
Diffstat (limited to 'drivers/rtc/rtc-bq4802.c')
-rw-r--r--drivers/rtc/rtc-bq4802.c4
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 {