lkml.org 
[lkml]   [2021]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] regulator: Make regulator_sync_voltage() usable by coupled regulators
On Fri, Jan 22, 2021 at 01:16:49AM +0300, Dmitry Osipenko wrote:

> + /* balance only if there are regulators coupled */
> + if (rdev->coupling_desc.n_coupled > 1) {
> + ret = regulator_balance_voltage(rdev, PM_SUSPEND_ON);
> + goto out;
> + }
> +
> ret = _regulator_do_set_voltage(rdev, min_uV, max_uV);
>
> out:

This would be clearer written as an if/else rather than using the goto.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-01-22 14:43    [W:0.076 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site