Search Linux Wireless

RE: [patch 1/4] mwifiex: remove unneeded kfree(NULL);

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

Thanks for your patch series.

> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
> Sent: Monday, October 17, 2011 11:13 PM
> To: Bing Zhao
> Cc: John W. Linville; linux-wireless@xxxxxxxxxxxxxxx; kernel-janitors@xxxxxxxxxxxxxxx
> Subject: [patch 1/4] mwifiex: remove unneeded kfree(NULL);
> 
> The previous if statement means this that pointer is NULL so there
> is no need to free it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Acked-by: Bing Zhao <bzhao@xxxxxxxxxxx>

Regards,
Bing

> 
> diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
> index d34acf0..4466976 100644
> --- a/drivers/net/wireless/mwifiex/pcie.c
> +++ b/drivers/net/wireless/mwifiex/pcie.c
> @@ -386,7 +386,6 @@ static int mwifiex_pcie_create_txbd_ring(struct mwifiex_adapter *adapter)
>  	card->txbd_ring_vbase = kzalloc(card->txbd_ring_size, GFP_KERNEL);
>  	if (!card->txbd_ring_vbase) {
>  		dev_err(adapter->dev, "Unable to allocate buffer for txbd ring.\n");
> -		kfree(card->txbd_ring_vbase);
>  		return -1;
>  	}
>  	card->txbd_ring_pbase = virt_to_phys(card->txbd_ring_vbase);
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux