diff mbox

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.

Message ID 1474487311-3897-1-git-send-email-harman4linux@gmail.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Harman Kalra Sept. 21, 2016, 7:48 p.m. UTC
Signed-off-by: Harman Kalra <harman4linux@gmail.com>
---
 drivers/ata/pata_at91.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Sergei Shtylyov Sept. 22, 2016, 10:44 a.m. UTC | #1
Hello.

On 9/21/2016 10:48 PM, Harman Kalra wrote:

    Looks like your patch summary and description got merged together in the 
subject.

> Signed-off-by: Harman Kalra <harman4linux@gmail.com>
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Sept. 22, 2016, 1:53 p.m. UTC | #2
On 09/22/2016 01:44 PM, Sergei Shtylyov wrote:

>    Looks like your patch summary and description got merged together in the
> subject.

    Also, the subject (summary) should contain driver name as a prefix: 
"pata_at91: Use ..."

>> Signed-off-by: Harman Kalra <harman4linux@gmail.com>
> [...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tejun Heo Sept. 22, 2016, 3:49 p.m. UTC | #3
On Thu, Sep 22, 2016 at 01:18:31AM +0530, Harman Kalra wrote:
> Signed-off-by: Harman Kalra <harman4linux@gmail.com>

Fixed up subject and applied to libata/for-4.9.

Thanks.
diff mbox

Patch

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)