All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
@ 2016-09-21 19:48 Harman Kalra
  2016-09-22 10:44 ` Sergei Shtylyov
  2016-09-22 15:49 ` Tejun Heo
  0 siblings, 2 replies; 4+ messages in thread
From: Harman Kalra @ 2016-09-21 19:48 UTC (permalink / raw)
  To: tj; +Cc: linux-ide, linux-kernel, Harman Kalra

Signed-off-by: Harman Kalra <harman4linux@gmail.com>
---
 drivers/ata/pata_at91.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 9f27b14..1611e0e 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -347,10 +347,8 @@ static int at91sam9_smc_fields_init(struct device *dev)
 
 	field.reg = AT91SAM9_SMC_MODE(AT91SAM9_SMC_GENERIC);
 	fields.mode = devm_regmap_field_alloc(dev, smc, field);
-	if (IS_ERR(fields.mode))
-		return PTR_ERR(fields.mode);
 
-	return 0;
+	return PTR_ERR_OR_ZERO(fields.mode);
 }
 
 static int pata_at91_probe(struct platform_device *pdev)
-- 
1.7.9.5

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

end of thread, other threads:[~2016-09-22 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 19:48 [PATCH] Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Harman Kalra
2016-09-22 10:44 ` Sergei Shtylyov
2016-09-22 13:53   ` Sergei Shtylyov
2016-09-22 15:49 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.