rtc: fix potential race condition
[deliverable/linux.git] / drivers / rtc / rtc-test.c
index 7746e65b93f290aab1db8c422d997d38962ac5ff..6599c20bc4540eafe7c14175419cbb933de80d66 100644 (file)
@@ -104,20 +104,17 @@ static int test_probe(struct platform_device *plat_dev)
        rtc = devm_rtc_device_register(&plat_dev->dev, "test",
                                &test_rtc_ops, THIS_MODULE);
        if (IS_ERR(rtc)) {
-               err = PTR_ERR(rtc);
-               return err;
+               return PTR_ERR(rtc);
        }
 
        err = device_create_file(&plat_dev->dev, &dev_attr_irq);
        if (err)
-               goto err;
+               dev_err(&plat_dev->dev, "Unable to create sysfs entry: %s\n",
+                       dev_attr_irq.attr.name);
 
        platform_set_drvdata(plat_dev, rtc);
 
        return 0;
-
-err:
-       return err;
 }
 
 static int test_remove(struct platform_device *plat_dev)
This page took 0.034336 seconds and 5 git commands to generate.