From: Markus Elfring <[email protected]>
Date: Fri, 2 Feb 2018 21:03:45 +0100
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 ssi_protocol_probe()
Fix a typo in two comment lines
drivers/hsi/clients/ssi_protocol.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--
2.16.1
From: Markus Elfring <[email protected]>
Date: Fri, 2 Feb 2018 20:02:17 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <[email protected]>
---
drivers/hsi/clients/ssi_protocol.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c
index 9b167bc6eee4..0bccea2fa119 100644
--- a/drivers/hsi/clients/ssi_protocol.c
+++ b/drivers/hsi/clients/ssi_protocol.c
@@ -1088,10 +1088,8 @@ static int ssi_protocol_probe(struct device *dev)
int err;
ssi = kzalloc(sizeof(*ssi), GFP_KERNEL);
- if (!ssi) {
- dev_err(dev, "No memory for ssi protocol\n");
+ if (!ssi)
return -ENOMEM;
- }
spin_lock_init(&ssi->lock);
timer_setup(&ssi->rx_wd, ssip_rx_wd, TIMER_DEFERRABLE);
--
2.16.1
From: Markus Elfring <[email protected]>
Date: Fri, 2 Feb 2018 20:57:23 +0100
Adjust two words in this description.
Signed-off-by: Markus Elfring <[email protected]>
---
drivers/hsi/clients/ssi_protocol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c
index 0bccea2fa119..6dbead863d07 100644
--- a/drivers/hsi/clients/ssi_protocol.c
+++ b/drivers/hsi/clients/ssi_protocol.c
@@ -993,8 +993,8 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
goto inc_dropped;
/*
- * Modem sends Phonet messages over SSI with its own endianess...
- * Assume that modem has the same endianess as we do.
+ * Modem sends Phonet messages over SSI with its own endianness.
+ * Assume that modem has the same endianness as we do.
*/
if (skb_cow_head(skb, 0))
goto drop;
--
2.16.1