diff options
-rw-r--r-- | drivers/extcon/extcon-max77693.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 39cd095d103c..f0f18e29ae07 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c | |||
@@ -1185,7 +1185,7 @@ static int max77693_muic_probe(struct platform_device *pdev) | |||
1185 | info->edev->name = DEV_NAME; | 1185 | info->edev->name = DEV_NAME; |
1186 | info->edev->dev.parent = &pdev->dev; | 1186 | info->edev->dev.parent = &pdev->dev; |
1187 | info->edev->supported_cable = max77693_extcon_cable; | 1187 | info->edev->supported_cable = max77693_extcon_cable; |
1188 | ret = extcon_dev_register(info->edev); | 1188 | ret = devm_extcon_dev_register(&pdev->dev, info->edev); |
1189 | if (ret) { | 1189 | if (ret) { |
1190 | dev_err(&pdev->dev, "failed to register extcon device\n"); | 1190 | dev_err(&pdev->dev, "failed to register extcon device\n"); |
1191 | goto err_irq; | 1191 | goto err_irq; |
@@ -1267,7 +1267,7 @@ static int max77693_muic_probe(struct platform_device *pdev) | |||
1267 | MAX77693_MUIC_REG_ID, &id); | 1267 | MAX77693_MUIC_REG_ID, &id); |
1268 | if (ret < 0) { | 1268 | if (ret < 0) { |
1269 | dev_err(&pdev->dev, "failed to read revision number\n"); | 1269 | dev_err(&pdev->dev, "failed to read revision number\n"); |
1270 | goto err_extcon; | 1270 | goto err_irq; |
1271 | } | 1271 | } |
1272 | dev_info(info->dev, "device ID : 0x%x\n", id); | 1272 | dev_info(info->dev, "device ID : 0x%x\n", id); |
1273 | 1273 | ||
@@ -1288,8 +1288,6 @@ static int max77693_muic_probe(struct platform_device *pdev) | |||
1288 | 1288 | ||
1289 | return ret; | 1289 | return ret; |
1290 | 1290 | ||
1291 | err_extcon: | ||
1292 | extcon_dev_unregister(info->edev); | ||
1293 | err_irq: | 1291 | err_irq: |
1294 | while (--i >= 0) | 1292 | while (--i >= 0) |
1295 | free_irq(muic_irqs[i].virq, info); | 1293 | free_irq(muic_irqs[i].virq, info); |
@@ -1305,7 +1303,6 @@ static int max77693_muic_remove(struct platform_device *pdev) | |||
1305 | free_irq(muic_irqs[i].virq, info); | 1303 | free_irq(muic_irqs[i].virq, info); |
1306 | cancel_work_sync(&info->irq_work); | 1304 | cancel_work_sync(&info->irq_work); |
1307 | input_unregister_device(info->dock); | 1305 | input_unregister_device(info->dock); |
1308 | extcon_dev_unregister(info->edev); | ||
1309 | 1306 | ||
1310 | return 0; | 1307 | return 0; |
1311 | } | 1308 | } |