regulator: tps65090: remove usage of IS_ERR_OR_NULL
PATCH 1/1 regulator: tps65090: remove usage of IS_ERR_OR_NULL
This patch changes the driver to avoid the usage of IS_ERR_OR_NULL() macro.
The case present in this patch simply translates to normal check for pointer, wheather it is NULL or has an error code.
---
:100644 100644 bd611cdf.. ad3d4d4... M drivers/regulator/tps65090-regulator.c
drivers/regulator/tps65090-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/tps65090-regulator.c +1 -1
@@ -245,7 +245,7 @@ static int tps65090_regulator_probe(struct platform_device *pdev)if (!tps65090_pdata && tps65090_mfd->dev->of_node) tps65090_pdata =tps65090_parse_dt_reg_data (pdev, &tps65090_reg_matches); -if (IS_ERR_OR_NULL (tps65090_pdata)) { +if (!tps65090_pdata ||IS_ERR (tps65090_pdata)) {dev_err (&pdev->dev,"Platform data missing\n" );return tps65090_pdata ?PTR_ERR (tps65090_pdata) : -EINVAL ; }
Signature · 1 line
1.7.10.4
Mark Brown
maintainerQuoted 2 lines · Manish Badarkhe
This patch changes the driver to avoid the usage of
IS_ERR_OR_NULL()macro.
Why?
Hi Mark,
Thank you for your reply.
Quoted 5 lines · Mark Brown
Quoted 2 lines · Manish Badarkhe
This patch changes the driver to avoid the usage of
IS_ERR_OR_NULL()macro.Why?
Code use "IS_ERR_OR_NULL()" properly as per current implementation. But as per patches [1], [2] below, the use of "IS_ERR_OR_NULL()" has been deprecated.
Hence done this change.
[1] - http://www.mail-archive.com/[email protected]/msg78030.html
[2] - http://comments.gmane.org/gmane.linux.power-management.general/33515
Please let me know your opinion about this change, If not necessary, will revert back
this change.
Regards,
Manish Badarkhe
Quoted 9 lines · Manish Badarkhe
Hi Mark,
Thank you for your reply.
Quoted 4 lines · Mark Brown
Quoted 2 lines · Manish Badarkhe
This patch changes the driver to avoid the usage of
IS_ERR_OR_NULL()macro.
Quoted 6 lines
Quoted 1 line
Why?
Code use "
IS_ERR_OR_NULL()" properly as per current implementation. But as per patches [1], [2] below, the use of "IS_ERR_OR_NULL()" has been deprecated.
Hence done this change.
The intent was to deprecate to *concept* of checking a return value for both NULL and an error. Simply removing usage of the macro and replacing it with the exact same code that was part of the macro doesn't fulfil the intent at all.
Hi Stephan,
Thank you for your reply.
Quoted 17 lines · Stephen Warren
Quoted 9 lines · Manish Badarkhe
Hi Mark,
Thank you for your reply.
Quoted 4 lines · Mark Brown
Quoted 2 lines · Manish Badarkhe
This patch changes the driver to avoid the usage of
IS_ERR_OR_NULL()macro.Quoted 6 lines
Quoted 1 line
Why?
Code use "
IS_ERR_OR_NULL()" properly as per current implementation. But as per patches [1], [2] below, the use of "IS_ERR_OR_NULL()" has been deprecated.
Hence done this change.
Quoted 4 lines
The intent was to deprecate to *concept* of checking a return value for both NULL and an error. Simply removing usage of the macro and replacing it with the exact same code that was part of the macro doesn't fulfil the intent at all.
Ok, Please drop this patch.
Regards
Manish Badarkhe