lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 29 Apr 2013 14:53:02 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: ab3100: Fix regulator register error handling

On Fri, Apr 26, 2013 at 3:57 PM, Axel Lin <axel.lin@...ics.com> wrote:

> 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@...ics.com>

Excellent patch Axel, thanks!
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ