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>
This commit is contained in:
Harman Kalra 2016-09-22 01:18:31 +05:30 committed by Tejun Heo
parent 02d9d3cbac
commit 70a19b7e40

View File

@ -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)