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]
Message-ID: <1456319775-3216-28-git-send-email-ldewangan@nvidia.com>
Date:	Wed, 24 Feb 2016 18:45:52 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	<linus.walleij@...aro.org>, <corbet@....net>, <lee@...nel.org>
CC:	<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-gpio@...r.kernel.org>,
	<linux-rpi-kernel@...ts.infradead.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<bcm-kernel-feedback-list@...adcom.com>,
	<linux-mediatek@...ts.infradead.org>,
	Laxman Dewangan <ldewangan@...dia.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Patrice Chotard <patrice.chotard@...com>
Subject: [PATCH 27/50] pinctrl: stm32: Use devm_pinctrl_register() for pinctrl registration

Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc: Patrice Chotard <patrice.chotard@...com>
---
 drivers/pinctrl/stm32/pinctrl-stm32.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index 8deb566..7291f07 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -813,10 +813,11 @@ int stm32_pctl_probe(struct platform_device *pdev)
 	pctl->pctl_desc.pmxops = &stm32_pmx_ops;
 	pctl->dev = &pdev->dev;
 
-	pctl->pctl_dev = pinctrl_register(&pctl->pctl_desc, &pdev->dev, pctl);
-	if (!pctl->pctl_dev) {
+	pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->pctl_desc,
+					       pctl);
+	if (IS_ERR(pctl->pctl_dev)) {
 		dev_err(&pdev->dev, "Failed pinctrl registration\n");
-		return -EINVAL;
+		return PTR_ERR(pctl->pctl_dev);
 	}
 
 	for (i = 0; i < pctl->nbanks; i++)
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ