Re: [PATCH v3 20/20] ASoC: uniphier: use devm_kmemdup_array()

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

 



On Mon, Feb 03, 2025 at 01:39:02PM +0530, Raag Jadav wrote:
> Convert to use devm_kmemdup_array() which is more robust.

...

>  	chip->num_plls = chip->chip_spec->num_plls;
> -	chip->plls = devm_kcalloc(dev,
> -				  chip->num_plls,
> -				  sizeof(struct uniphier_aio_pll),
> -				  GFP_KERNEL);
> +	chip->plls = devm_kmemdup_array(dev, chip->chip_spec->plls, chip->num_plls,
> +					sizeof(struct uniphier_aio_pll), GFP_KERNEL);

sizeof(*chip->plls) ?

>  	if (!chip->plls)
>  		return -ENOMEM;

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux