[PATCH] qeth: Cocci spatch "ptr_ret.spatch"
Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c @@ -3348,7 +3348,7 @@ static int __init claw_init(void) } CLAW_DBF_TEXT(2, setup, "init_mod"); claw_root_dev = root_device_register("claw"); - ret = IS_ERR(claw_root_dev) ? PTR_ERR(claw_root_dev) : 0; + ret = PTR_RET(claw_root_dev); if (ret) goto register_err; ret = ccw_driver_register(_ccw_driver); diff -u -p a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c @@ -1837,7 +1837,7 @@ static int __init ctcm_init(void) if (ret) goto out_err; ctcm_root_dev = root_device_register("ctcm"); - ret = IS_ERR(ctcm_root_dev) ? PTR_ERR(ctcm_root_dev) : 0; + ret = PTR_RET(ctcm_root_dev); if (ret) goto register_err; ret = ccw_driver_register(_ccw_driver); diff -u -p a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c @@ -2441,7 +2441,7 @@ __init lcs_init_module(void) if (rc) goto out_err; lcs_root_dev = root_device_register("lcs"); - rc = IS_ERR(lcs_root_dev) ? PTR_ERR(lcs_root_dev) : 0; + rc = PTR_RET(lcs_root_dev); if (rc) goto register_err; rc = ccw_driver_register(_ccw_driver); diff -u -p a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -5705,7 +5705,7 @@ static int __init qeth_core_init(void) if (rc) goto out_err; qeth_core_root_dev = root_device_register("qeth"); - rc = IS_ERR(qeth_core_root_dev) ? PTR_ERR(qeth_core_root_dev) : 0; + rc = PTR_RET(qeth_core_root_dev); if (rc) goto register_err; qeth_core_header_cache = kmem_cache_create("qeth_hdr", -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] qeth: Cocci spatch ptr_ret.spatch
Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c @@ -3348,7 +3348,7 @@ static int __init claw_init(void) } CLAW_DBF_TEXT(2, setup, init_mod); claw_root_dev = root_device_register(claw); - ret = IS_ERR(claw_root_dev) ? PTR_ERR(claw_root_dev) : 0; + ret = PTR_RET(claw_root_dev); if (ret) goto register_err; ret = ccw_driver_register(claw_ccw_driver); diff -u -p a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c @@ -1837,7 +1837,7 @@ static int __init ctcm_init(void) if (ret) goto out_err; ctcm_root_dev = root_device_register(ctcm); - ret = IS_ERR(ctcm_root_dev) ? PTR_ERR(ctcm_root_dev) : 0; + ret = PTR_RET(ctcm_root_dev); if (ret) goto register_err; ret = ccw_driver_register(ctcm_ccw_driver); diff -u -p a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c @@ -2441,7 +2441,7 @@ __init lcs_init_module(void) if (rc) goto out_err; lcs_root_dev = root_device_register(lcs); - rc = IS_ERR(lcs_root_dev) ? PTR_ERR(lcs_root_dev) : 0; + rc = PTR_RET(lcs_root_dev); if (rc) goto register_err; rc = ccw_driver_register(lcs_ccw_driver); diff -u -p a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -5705,7 +5705,7 @@ static int __init qeth_core_init(void) if (rc) goto out_err; qeth_core_root_dev = root_device_register(qeth); - rc = IS_ERR(qeth_core_root_dev) ? PTR_ERR(qeth_core_root_dev) : 0; + rc = PTR_RET(qeth_core_root_dev); if (rc) goto register_err; qeth_core_header_cache = kmem_cache_create(qeth_hdr, -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/