clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe()
[linux-2.6-microblaze.git] / drivers / clocksource / ingenic-ost.c
index d2d6646..06d2575 100644 (file)
@@ -88,9 +88,9 @@ static int __init ingenic_ost_probe(struct platform_device *pdev)
                return PTR_ERR(ost->regs);
 
        map = device_node_to_regmap(dev->parent->of_node);
-       if (!map) {
+       if (IS_ERR(map)) {
                dev_err(dev, "regmap not found");
-               return -EINVAL;
+               return PTR_ERR(map);
        }
 
        ost->clk = devm_clk_get(dev, "ost");