summaryrefslogtreecommitdiff
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2017-01-09 15:38:25 +0300
committerTejun Heo <tj@kernel.org>2017-01-09 15:38:25 +0300
commit0fe4618d3b22d0ae44a4e650526466cf570ff8a5 (patch)
tree0c692cacd3431642945df7f4163aefca63ede012 /drivers/ata/sata_mv.c
parent88af4bbd8f6983378c3098ca3e26c4e48434fe69 (diff)
parent064c3db9c564cc5be514ac21fb4aa26cc33db746 (diff)
downloadlinux-0fe4618d3b22d0ae44a4e650526466cf570ff8a5.tar.xz
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);