X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fata%2Fsata_mv.c;h=d5091f3a3233343b9cb6d730c48ecb8e109d7baf;hb=c2ddb5852a591e11abac56114485c04411e8386b;hp=0b8b8b488ee82d271415f3608dcad5f6af58ebef;hpb=6fd8fb7f55cb6d45e7f078cd0eaf7e3c243f6c33;p=pandora-kernel.git diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 0b8b8b488ee8..d5091f3a3233 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -4059,6 +4059,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; #if defined(CONFIG_HAVE_CLK)