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-next>] [day] [month] [year] [list]
Date:	Wed, 27 Aug 2014 16:27:29 +0530
From:	Pramod Gurav <pramod.gurav@...rtplayin.com>
To:	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Cc:	Pramod Gurav <pramod.gurav@...rtplayin.com>,
	"Ivan T. Ivanov" <iivanov@...sol.com>,
	Bjorn Andersson <bjorn.andersson@...ymobile.com>,
	Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH] pinctrl: qcom: Release pin ranges when gpiochip_irqchip_add fails

This patches adds a call to gpiochip_remove_pin_ranges when
gpiochip_irqchip_add fails to release memory allocated for pin_ranges.

CC: Ivan T. Ivanov <iivanov@...sol.com>
CC: Bjorn Andersson <bjorn.andersson@...ymobile.com>
CC: Linus Walleij <linus.walleij@...aro.org>
Signed-off-by: Pramod Gurav <pramod.gurav@...rtplayin.com>
---
 drivers/pinctrl/qcom/pinctrl-msm.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index f4e4f8f..aa34b5a 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -845,6 +845,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
 				   IRQ_TYPE_NONE);
 	if (ret) {
 		dev_err(pctrl->dev, "Failed to add irqchip to gpiochip\n");
+		gpiochip_remove_pin_ranges(chip);
 		return -ENOSYS;
 	}
 
-- 
1.7.9.5

--
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