s390/drivers: Cocci spatch "ptr_ret.spatch"
authorThomas Meyer <thomas@m3y3r.de>
Sat, 1 Jun 2013 09:58:09 +0000 (11:58 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 26 Jun 2013 19:10:22 +0000 (21:10 +0200)
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/sclp.c
drivers/s390/char/sclp_cmd.c
drivers/s390/char/tape_class.c

index 97319d692b047df98dd332ee248e9a64911a4a1f..3e4fb4e858da7514eb7a1c5677d23577acba7793 100644 (file)
@@ -1170,7 +1170,7 @@ static __init int sclp_initcall(void)
                return rc;
 
        sclp_pdev = platform_device_register_simple("sclp", -1, NULL, 0);
-       rc = IS_ERR(sclp_pdev) ? PTR_ERR(sclp_pdev) : 0;
+       rc = PTR_RET(sclp_pdev);
        if (rc)
                goto fail_platform_driver_unregister;
 
index 657b0348579c93cd601c33286a696f8c1c39d549..8cd34bf644b3ee4b34065814fab4300774c8ad23 100644 (file)
@@ -668,7 +668,7 @@ static int __init sclp_detect_standby_memory(void)
        if (rc)
                goto out;
        sclp_pdev = platform_device_register_simple("sclp_mem", -1, NULL, 0);
-       rc = IS_ERR(sclp_pdev) ? PTR_ERR(sclp_pdev) : 0;
+       rc = PTR_RET(sclp_pdev);
        if (rc)
                goto out_driver;
        sclp_add_standby_memory();
index 54b3c79203f5103964e93b80c73e7cc1f13ae9a6..91c3c642c76e44e97f8538da6e58672339c98e55 100644 (file)
@@ -77,7 +77,7 @@ struct tape_class_device *register_tape_dev(
        tcd->class_device = device_create(tape_class, device,
                                          tcd->char_device->dev, NULL,
                                          "%s", tcd->device_name);
-       rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0;
+       rc = PTR_RET(tcd->class_device);
        if (rc)
                goto fail_with_cdev;
        rc = sysfs_create_link(