sata_dwc_460ex: Delete an error message for a failed memory allocation in sata_dwc_port_start()
Subsystems (2)
PATCH 1/1 sata_dwc_460ex: Delete an error message for a failed memory allocation in sata_dwc_port_start()
From: Markus Elfring <[email protected]>
Date: Thu, 15 Feb 2018 22:15:25 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
--- drivers/ata/sata_dwc_460ex.c | 1 - 1 file changed, 1 deletion(-)
drivers/ata/sata_dwc_460ex.c +0 -1
@@ -901,7 +901,6 @@ static int sata_dwc_port_start(struct ata_port *ap)/* Allocate Port Struct */ hsdevp =kzalloc (sizeof (*hsdevp),GFP_KERNEL );if (!hsdevp) { -dev_err (ap->dev,"%s: kmalloc failed for hsdevp\n" , __func__); err = -ENOMEM ; goto CLEANUP; }
Signature · 1 line
2.16.1
Quoted 7 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Thu, 15 Feb 2018 22:15:25 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Tejun, it's up to you. In case you are fine with the change,
Quoted 21 lines
Signed-off-by Markus Elfring <[email protected]>--- drivers/ata/sata_dwc_460ex.c | 1 - 1 file changed, 1 deletion(-)drivers/ata/sata_dwc_460ex.c +0
-1@@ -901,7 +901,6 @@ static int sata_dwc_port_start(struct ata_port *ap)/* Allocate Port Struct */ hsdevp =kzalloc (sizeof (*hsdevp),GFP_KERNEL );if (!hsdevp) { -dev_err (ap->dev,"%s: kmalloc failed for hsdevp\n" , __func__); err = -ENOMEM ;drivers/ata/sata_dwc_460ex.c +0
-0goto CLEANUP; }
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 10 lines · Andy Shevchenko
Quoted 7 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Thu, 15 Feb 2018 22:15:25 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Tejun, it's up to you. In case you are fine with the change,
Yeah, these are marginal at best and one may be able to argue that emitting a message with device identifier is still useful but these allocations are order-zero and can't fail to begin with, so...
Thanks.
Signature · 1 line
tejun
Quoted 8 lines · Tejun Heo
Quoted 7 lines · Andy Shevchenko
Quoted 6 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Thu, 15 Feb 2018 22:15:25 +0100Omit an extra message for a memory allocation failure in this function.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
This issue was detected by using the Coccinelle software.
Tejun, it's up to you. In case you are fine with the change,
Yeah, these are marginal at best and one may be able to argue that emitting a message with device identifier is still useful but these allocations are order-zero and can't fail to begin with, so...
IIRC device core prints a warn with error code and device name if ->probe() fails.
Signature · 2 lines
With Best Regards, Andy Shevchenko