Re: [PATCH v6 4/4] thermal: k3_j72xx_bandgap: Add the bandgap driver support

From: Joe Perches
Date: Mon May 09 2022 - 01:24:50 EST


On Wed, 2022-05-04 at 11:00 +0300, Dan Carpenter wrote:
> Hi Keerthy,
[]
> vim +/ref_table +521 drivers/thermal/k3_j72xx_bandgap.c
[]
> bb7f95a68cbaa1 Keerthy 2022-04-27 426 ref_table = kzalloc(sizeof(*ref_table) * TABLE_SIZE, GFP_KERNEL);
> bb7f95a68cbaa1 Keerthy 2022-04-27 427 if (!ref_table) {
> bb7f95a68cbaa1 Keerthy 2022-04-27 428 ret = -ENOMEM;
> bb7f95a68cbaa1 Keerthy 2022-04-27 429 goto err_alloc;
> bb7f95a68cbaa1 Keerthy 2022-04-27 430 }

devm_kcalloc

> bb7f95a68cbaa1 Keerthy 2022-04-27 431
> bb7f95a68cbaa1 Keerthy 2022-04-27 432 derived_table = devm_kzalloc(bgp->dev, sizeof(*derived_table) * TABLE_SIZE,
> bb7f95a68cbaa1 Keerthy 2022-04-27 433 GFP_KERNEL);

here too