s390: Cocci spatch "ptr_ret.spatch" (2)
PATCH 1/1 s390: Cocci spatch "ptr_ret.spatch" (2)
Signed-off-by Thomas Meyer <[email protected]>
---
drivers/s390/char/sclp.c +1 -1
@@ -1097,7 +1097,7 @@ static __init int sclp_initcall(void)if (rc)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; rc = atomic_notifier_chain_register(&panic_notifier_list,
drivers/s390/char/sclp_cmd.c +1 -1
@@ -668,7 +668,7 @@ static int __init sclp_detect_standby_meif (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 ();
drivers/s390/char/tape_class.c +1 -1
@@ -77,7 +77,7 @@ struct tape_class_device *register_tape_ 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(