ieee802154: ca8210: Adjustments for two function implementations
Subsystems (5)
cover ieee802154: ca8210: Adjustments for two function implementations
From: Markus Elfring <[email protected]>
Date: Mon, 22 May 2017 08:08:04 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation in ca8210_probe() Delete an error message for a failed memory allocation in ca8210_skb_rx()
drivers/net/ieee802154/ca8210.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
Signature · 1 line
2.13.0
PATCH 1/2 ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_probe()
From: Markus Elfring <[email protected]>
Date: Mon, 22 May 2017 07:32:46 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
--- drivers/net/ieee802154/ca8210.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ieee802154/ca8210.c +0 -4
@@ -3143,10 +3143,6 @@ static int ca8210_probe(struct spi_device *spi_device) pdata =kmalloc (sizeof (*pdata),GFP_KERNEL );if (!pdata) { -dev_crit ( - &spi_device->dev, -"Could not allocate platform data\n" - ); ret = -ENOMEM ; goto error; }
Signature · 1 line
2.13.0
PATCH 2/2 ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_skb_rx()
In reply to SF Markus ElfringFrom: Markus Elfring <[email protected]>
Date: Mon, 22 May 2017 08:03:17 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
--- drivers/net/ieee802154/ca8210.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ieee802154/ca8210.c +2 -3
@@ -1808,10 +1808,9 @@ static int ca8210_skb_rx(/* Allocate mtu size buffer for every rx packet */ skb =dev_alloc_skb (IEEE802154_MTU +sizeof (hdr)); -if (!skb) { -dev_crit (&priv->spi->dev,"dev_alloc_skb failed\n" ); +if (!skb)return -ENOMEM ; - } +skb_reserve (skb,sizeof (hdr)); msdulen = data_ind[22 ];/* msdu_length */
Signature · 1 line
2.13.0
Hi Markus,
Quoted 9 lines
Two update suggestions were taken into account
from static source code analysis.Markus Elfring (2):
Delete an error message for a failed memory allocation inca8210_probe()Delete an error message for a failed memory allocation inca8210_skb_rx()
drivers/net/ieee802154/ca8210.c| 9 ++-------1 file changed, 2 insertions(+), 7 deletions(-)
both patches have been applied to bluetooth-next tree.
Regards
Marcel