Skip to content
Permalink
Browse files

driver: sysfs: fix parameter usage

find_cell_cpu gets a cell as parameter, but ignores it. It only uses
root_cell.

This bug never had any consequences, as this routine is only one single
caller, and always gets root_cell as parameter. Nevertheless, fix this
by using the correct parameter.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information...
rralf authored and jan-kiszka committed Sep 20, 2019
1 parent de7a258 commit 7cc0dc906976651c0a2f7561cadd8cb6af9ed707
Showing with 1 addition and 1 deletion.
  1. +1 −1 driver/sysfs.c
@@ -353,7 +353,7 @@ static struct cell_cpu *find_cell_cpu(struct cell *cell, unsigned int cpu)
{
struct cell_cpu *cell_cpu;

list_for_each_entry(cell_cpu, &root_cell->cell_cpus, entry)
list_for_each_entry(cell_cpu, &cell->cell_cpus, entry)
if (cell_cpu->cpu == cpu)
return cell_cpu;

0 comments on commit 7cc0dc9

Please sign in to comment.
You can’t perform that action at this time.