Browse Source

regulator: fix unset_regulator_supplies() to remove all matches

Remove all matching consumer supplies, not just the first, to not leave
dangling pointers.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Jani Nikula 15 years ago
parent
commit
47bd53f0e8
1 changed files with 0 additions and 1 deletions
  1. 0 1
      drivers/regulator/core.c

+ 0 - 1
drivers/regulator/core.c

@@ -1013,7 +1013,6 @@ static void unset_regulator_supplies(struct regulator_dev *rdev)
 			list_del(&node->list);
 			list_del(&node->list);
 			kfree(node->dev_name);
 			kfree(node->dev_name);
 			kfree(node);
 			kfree(node);
-			return;
 		}
 		}
 	}
 	}
 }
 }