WIP: merge_config
[platform/kernel/linux-starfive.git] / drivers / mailbox / arm_mhuv2.c
index a47aef8..c6d4957 100644 (file)
@@ -1062,8 +1062,8 @@ static int mhuv2_probe(struct amba_device *adev, const struct amba_id *id)
        int ret = -EINVAL;
 
        reg = devm_of_iomap(dev, dev->of_node, 0, NULL);
-       if (!reg)
-               return -ENOMEM;
+       if (IS_ERR(reg))
+               return PTR_ERR(reg);
 
        mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL);
        if (!mhu)