summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/ata/sata_mv.c')
-rw-r--r--kernel/drivers/ata/sata_mv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/drivers/ata/sata_mv.c b/kernel/drivers/ata/sata_mv.c
index bd74ee555..729f26322 100644
--- a/kernel/drivers/ata/sata_mv.c
+++ b/kernel/drivers/ata/sata_mv.c
@@ -4121,6 +4121,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);