Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Samuel Ortiz
ef256176 288129f3

+1 -1
+1 -1
drivers/mfd/ucb1400_core.c
··· 114 114 err3: 115 115 platform_device_put(ucb->ucb1400_ts); 116 116 err2: 117 - platform_device_unregister(ucb->ucb1400_gpio); 117 + platform_device_del(ucb->ucb1400_gpio); 118 118 err1: 119 119 platform_device_put(ucb->ucb1400_gpio); 120 120 err0: