public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL
@ 2013-10-01  4:11 Manish Badarkhe
  2013-10-01  9:22 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Manish Badarkhe @ 2013-10-01  4:11 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
	rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ,
	badarkhe.manish-Re5JQEeQqe8AvxtiuMwx3w

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.

Signed-off-by: Manish Badarkhe <badarkhe.manish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
:100644 100644 bd611cdf.. ad3d4d4... M	drivers/regulator/tps65090-regulator.c
 drivers/regulator/tps65090-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c
index bd611cdf..ad3d4d4 100644
--- a/drivers/regulator/tps65090-regulator.c
+++ b/drivers/regulator/tps65090-regulator.c
@@ -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;
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-01 16:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01  4:11 [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL Manish Badarkhe
2013-10-01  9:22 ` Mark Brown
     [not found]   ` <20131001092258.GJ19304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-10-01 14:59     ` Manish Badarkhe
     [not found]       ` <CAKDJKT6kBi_axtn+qDBkwueRGn_zzOAdSstRF=x1OqX-TrO2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-01 15:49         ` Stephen Warren
2013-10-01 16:32           ` Manish Badarkhe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox