drivers: net: Remove remaining alloc/OOM messages
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/memcpy to kmemdup. Removed now unused stack variables. Removed unnecessary parentheses. Neatened alignment. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Arend van Spriel <arend@broadcom.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e9ba103931
commit
14f8dc4953
@@ -1452,17 +1452,7 @@ static void ath_rate_free(void *priv)
|
||||
|
||||
static void *ath_rate_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
|
||||
{
|
||||
struct ath_softc *sc = priv;
|
||||
struct ath_rate_priv *rate_priv;
|
||||
|
||||
rate_priv = kzalloc(sizeof(struct ath_rate_priv), gfp);
|
||||
if (!rate_priv) {
|
||||
ath_err(ath9k_hw_common(sc->sc_ah),
|
||||
"Unable to allocate private rc structure\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rate_priv;
|
||||
return kzalloc(sizeof(struct ath_rate_priv), gfp);
|
||||
}
|
||||
|
||||
static void ath_rate_free_sta(void *priv, struct ieee80211_sta *sta,
|
||||
|
Reference in New Issue
Block a user