Re: [PATCH net-next v2 07/10] ethtool: cmis_cdb: Add a layer for supporting CDB commands

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

 



On Mon, 15 Apr 2024 15:07:14 +0300 Danielle Ratson wrote:
> +	page_data->data = kmalloc(page_data->length, GFP_KERNEL);
> +	if (!page_data->data)
> +		return -ENOMEM;
> +
> +	memcpy(page_data->data, data, page_data->length);

coccicheck suggests to use kmemdup() here:

net/ethtool/cmis_cdb.c:504:19-26: WARNING opportunity for kmemdup
-- 
pw-bot: cr




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux