浏览代码

mfd: Avoid calling platform_device_put() twice in ucb1400 probe error path

In the case of goto err2, what we want is to call
platform_device_del() instead of platform_device_unregister().
Otherwise, we call platform_device_put() twice.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin 15 年之前
父节点
当前提交
ef256176c7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/mfd/ucb1400_core.c

+ 1 - 1
drivers/mfd/ucb1400_core.c

@@ -114,7 +114,7 @@ static int ucb1400_core_probe(struct device *dev)
 err3:
 	platform_device_put(ucb->ucb1400_ts);
 err2:
-	platform_device_unregister(ucb->ucb1400_gpio);
+	platform_device_del(ucb->ucb1400_gpio);
 err1:
 	platform_device_put(ucb->ucb1400_gpio);
 err0: