Skip to contentSkip to conversation

Staging: rtlwifi: Remove unnecessary 'out of memory' message.

PATCH New Shreeya Patel 1 participant 1 message Sep 11, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 Staging: rtlwifi: Remove unnecessary 'out of memory' message.

Logging messages that show some type of "out of memory" error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.

These messages generally increase kernel size without much added value.

Problem found by checkpatch.

---

Changes in v5:
-Do not remove leading spaces from the patch.

Changes in v4:
-Include v2 and v3 in the patch.

Changes in v3:
-Make the commit message more appropriate.

Changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.

 drivers/staging/rtlwifi/rc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtlwifi/rc.c +1 -3
index 65de0c7..779a5c6 100644
@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,
 	struct rtl_rate_priv *rate_priv;
 
 	rate_priv = kzalloc(sizeof(*rate_priv), gfp);
-	if (!rate_priv) {
-		pr_err("Unable to allocate private rc structure\n");
+	if (!rate_priv)
 		return NULL;
-	}
 
 	rtlpriv->rate_priv = rate_priv;
 
Signature · 1 line
2.7.4