summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-04-26 21:57:09 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-26 16:33:10 +0100
commit018fd856cee9ebe794da1382ff7fafae64781dc5 (patch)
treef8ac600c4c71919de6d8d6f9165f62f4b5db560f /net/sched
parent8735bc2fe69c3cd18c54dc1b993106dbeb7618be (diff)
downloadlinux-018fd856cee9ebe794da1382ff7fafae64781dc5.tar.bz2
regulator: ab3100: Fix regulator register error handling
Ensure to unregister all regulators before return error in probe(). The regulator register order depends on the regulator ID pass to ab3100_regulator_register() function. Thus we need to scan ab3100_regulator_desc and find the index of successfully registered regulators, or alternatively just call ab3100_regulators_remove() to unregister all registered regulators. Since current code uses a static ab3100_regulators table, explicitly set reg->rdev = NULL after regulator_unregister() call to ensure calling ab3100_regulators_remove() in the unwind path always work. Also move ab3100_regulators_remove() to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'net/sched')
0 files changed, 0 insertions, 0 deletions