Skip to content

Commit 434d226

Browse files
author
Al Stone
committed
power: supply: Fix typo in power_supply_check_supplies
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071846 Tested: This is one of a series of patch sets to enable Arm SystemReady IR support in the kernel for NXP i.MX8 platforms. This set updates the power subsystem. This set has been tested via simple boot tests and the CI loop. commit 966f655 Author: Schspa Shi <schspa@gmail.com> Date: Tue Jul 5 11:32:44 2022 +0800 power: supply: Fix typo in power_supply_check_supplies It seems to be a typo, there is no actual BUG, but it's better to fix it to avoid any possible BUG after we change the type of supplied_from. Signed-off-by: Schspa Shi <schspa@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> (cherry picked from commit 966f655) Signed-off-by: Al Stone <ahs3@redhat.com>
1 parent b44f184 commit 434d226

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/power/supply/power_supply_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,13 @@ static int power_supply_check_supplies(struct power_supply *psy)
263263
return 0;
264264

265265
/* All supplies found, allocate char ** array for filling */
266-
psy->supplied_from = devm_kzalloc(&psy->dev, sizeof(psy->supplied_from),
266+
psy->supplied_from = devm_kzalloc(&psy->dev, sizeof(*psy->supplied_from),
267267
GFP_KERNEL);
268268
if (!psy->supplied_from)
269269
return -ENOMEM;
270270

271271
*psy->supplied_from = devm_kcalloc(&psy->dev,
272-
cnt - 1, sizeof(char *),
272+
cnt - 1, sizeof(**psy->supplied_from),
273273
GFP_KERNEL);
274274
if (!*psy->supplied_from)
275275
return -ENOMEM;

0 commit comments

Comments
 (0)