Skip to contentSkip to conversation

mwifiex: 11n_rxreorder: Remove unnecessary cast in kfree()

PATCH In review Xu Wang 2 participants 2 messages Jul 27, 2020 – Aug 2, 2020

Subsystems (3)
lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 mwifiex: 11n_rxreorder: Remove unnecessary cast in kfree()

Remove unnecassary casts in the argument to kfree.

---
 drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +1 -1
index 0bdafe9f66db..1046b59647f5 100644
@@ -398,7 +398,7 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
 	new_node->rx_reorder_ptr = kcalloc(win_size, sizeof(void *),
 					   GFP_KERNEL);
 	if (!new_node->rx_reorder_ptr) {
-		kfree((u8 *) new_node);
+		kfree(new_node);
 		mwifiex_dbg(priv->adapter, ERROR,
 			    "%s: failed to alloc reorder_ptr\n", __func__);
 		return;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 3 lines · Xu Wang

Remove unnecassary casts in the argument to kfree.

Patch applied to wireless-drivers-next.git, thanks.

614946480f8f mwifiex: 11n_rxreorder: Remove unnecessary cast in kfree()

Signature · 3 lines
https://patchwork.kernel.org/patch/11686265/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches