summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorHarman Kalra <harman4linux@gmail.com>2016-09-22 01:18:31 +0530
committerTejun Heo <tj@kernel.org>2016-09-22 11:48:46 -0400
commit70a19b7e406da9dc5cea20fedba443374a5cae70 (patch)
tree98c63dda57f328d8493edc2a181c6b0630931f7b /drivers/ata
parent02d9d3cbac53bd59fe18fc32adc7bc7cde1037ae (diff)
downloadlinux-stable-70a19b7e406da9dc5cea20fedba443374a5cae70.tar.gz
linux-stable-70a19b7e406da9dc5cea20fedba443374a5cae70.tar.bz2
linux-stable-70a19b7e406da9dc5cea20fedba443374a5cae70.zip
pata_at91: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: Harman Kalra <harman4linux@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_at91.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 9f27b14009f9..1611e0e8d767 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)