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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Apr 2014 13:49:38 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	"Ivan T. Ivanov" <iivanov@...sol.com>
Cc:	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	USB list <linux-usb@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v7 05/20] usb: phy: msm: Migrate to Managed Device
 Resource allocation

On Thu, Apr 24, 2014 at 12:48 PM, Ivan T. Ivanov <iivanov@...sol.com> wrote:

> +       motg->vddcx = devm_regulator_get(motg->phy.dev, "HSUSB_VDDCX");
> +       if (IS_ERR(motg->vddcx)) {
> +               dev_err(motg->phy.dev, "unable to get hsusb vddcx\n");
> +               return PTR_ERR(motg->vddcx);
> +       }
> +
> +       motg->v3p3 = devm_regulator_get(motg->phy.dev, "HSUSB_3p3");
> +       if (IS_ERR(motg->v3p3)) {
> +               dev_err(motg->phy.dev, "unable to get hsusb 3p3\n");
> +               return PTR_ERR(motg->v3p3);
> +       }
> +
> +       motg->v1p8 = devm_regulator_get(motg->phy.dev, "HSUSB_1p8");
> +       if (IS_ERR(motg->v1p8)) {
> +               dev_err(motg->phy.dev, "unable to get hsusb 1p8\n");
> +               return PTR_ERR(motg->v1p8);
> +       }

It seems that calling devm_regulator_bulk_get() here would simplify
the code here.
--
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