bus: ti-sysc: Use 2-factor allocator calls
PATCH 1/1 bus: ti-sysc: Use 2-factor allocator calls
As done treewide already, switch from open-coded multiplication to the 2-factor allocation helpers.
Signed-off-by Kees Cook <[email protected]>
--- drivers/bus/ti-sysc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/bus/ti-sysc.c +4 -4
@@ -169,9 +169,9 @@ static int sysc_get_clocks(struct sysc *ddata)const char *name;int nr_fck =0 , nr_ick =0 , i, error =0 ; - ddata->clock_roles =devm_kzalloc (ddata->dev, -sizeof (*ddata->clock_roles) * + ddata->clock_roles =devm_kcalloc (ddata->dev,SYSC_MAX_CLOCKS , +sizeof (*ddata->clock_roles),GFP_KERNEL );if (!ddata->clock_roles)return -ENOMEM ;
@@ -200,8 +200,8 @@ static int sysc_get_clocks(struct sysc *ddata)return -EINVAL ; } - ddata->clocks =devm_kzalloc (ddata->dev, -sizeof (*ddata->clocks) * ddata->nr_clocks, + ddata->clocks =devm_kcalloc (ddata->dev, + ddata->nr_clocks,sizeof (*ddata->clocks),GFP_KERNEL );if (!ddata->clocks)return -ENOMEM ;
Signature · 6 lines
2.17.1 -- Kees Cook Pixel Security
Tony Lindgren
maintainerHi,
Quoted 2 lines · Kees Cook
As done treewide already, switch from open-coded multiplication to the 2-factor allocation helpers.
I just sent a pull request for your previous version of this patch with you in Cc.
Regards,
Tony