aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pinctrl/pinctrl-abx500.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index 426b47cd6433..81ef5152714b 100644
--- a/drivers/pinctrl/pinctrl-abx500.c
+++ b/drivers/pinctrl/pinctrl-abx500.c
@@ -1155,11 +1155,13 @@ static int abx500_gpio_probe(struct platform_device *pdev)
1155 default: 1155 default:
1156 dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", 1156 dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n",
1157 (int) platid->driver_data); 1157 (int) platid->driver_data);
1158 mutex_destroy(&pct->lock);
1158 return -EINVAL; 1159 return -EINVAL;
1159 } 1160 }
1160 1161
1161 if (!pct->soc) { 1162 if (!pct->soc) {
1162 dev_err(&pdev->dev, "Invalid SOC data\n"); 1163 dev_err(&pdev->dev, "Invalid SOC data\n");
1164 mutex_destroy(&pct->lock);
1163 return -EINVAL; 1165 return -EINVAL;
1164 } 1166 }
1165 1167
@@ -1176,6 +1178,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
1176 ret = gpiochip_add(&pct->chip); 1178 ret = gpiochip_add(&pct->chip);
1177 if (ret) { 1179 if (ret) {
1178 dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret); 1180 dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
1181 mutex_destroy(&pct->lock);
1179 goto out_rem_irq; 1182 goto out_rem_irq;
1180 } 1183 }
1181 dev_info(&pdev->dev, "added gpiochip\n"); 1184 dev_info(&pdev->dev, "added gpiochip\n");