aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-hix5hd2-sata.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/phy/phy-hix5hd2-sata.c')
-rw-r--r--drivers/phy/phy-hix5hd2-sata.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/phy/phy-hix5hd2-sata.c b/drivers/phy/phy-hix5hd2-sata.c
index 34915b4202f1..d6b22659cac1 100644
--- a/drivers/phy/phy-hix5hd2-sata.c
+++ b/drivers/phy/phy-hix5hd2-sata.c
@@ -147,6 +147,9 @@ static int hix5hd2_sata_phy_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -EINVAL;
+
priv->base = devm_ioremap(dev, res->start, resource_size(res));
if (!priv->base)
return -ENOMEM;