OSDN Git Service

rtlwifi: Remove unnecessary 'out of memory' message
authorShreeya Patel <shreeya.patel23498@gmail.com>
Fri, 29 Dec 2017 08:31:06 +0000 (16:31 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 8 Jan 2018 17:07:43 +0000 (19:07 +0200)
This is merged by Ping-Ke Shih from commit 596e0559d61a ("Staging:
rtlwifi: Remove unnecessary 'out of memory' message."), and commit log
is reserved below.

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.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rc.c

index 02811ed..9638bf4 100644 (file)
@@ -265,11 +265,9 @@ static void *rtl_rate_alloc_sta(void *ppriv,
        struct rtl_priv *rtlpriv = ppriv;
        struct rtl_rate_priv *rate_priv;
 
-       rate_priv = kzalloc(sizeof(struct rtl_rate_priv), gfp);
-       if (!rate_priv) {
-               pr_err("Unable to allocate private rc structure\n");
+       rate_priv = kzalloc(sizeof(*rate_priv), gfp);
+       if (!rate_priv)
                return NULL;
-       }
 
        rtlpriv->rate_priv = rate_priv;