summaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2017-01-09 13:38:25 +0100
committerTejun Heo <tj@kernel.org>2017-01-09 13:38:25 +0100
commit0fe4618d3b22d0ae44a4e650526466cf570ff8a5 (patch)
tree0c692cacd3431642945df7f4163aefca63ede012 /drivers/ata/sata_mv.c
parentata: sata_mv: fix module license specification (diff)
parentata: sata_mv:- Handle return value of devm_ioremap. (diff)
downloadlinux-0fe4618d3b22d0ae44a4e650526466cf570ff8a5.tar.xz
linux-0fe4618d3b22d0ae44a4e650526466cf570ff8a5.zip
Merge branch 'for-4.10-fixes' into for-4.11
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index bcbfe23a45f6..6eed4a72d328 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4132,6 +4132,9 @@ static int mv_platform_probe(struct platform_device *pdev)
host->iomap = NULL;
hpriv->base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
+ if (!hpriv->base)
+ return -ENOMEM;
+
hpriv->base -= SATAHC0_REG_BASE;
hpriv->clk = clk_get(&pdev->dev, NULL);