From: Axel Lin Date: Tue, 3 Aug 2010 08:34:13 +0000 (+0800) Subject: mfd: Avoid calling platform_device_put() twice in ucb1400 probe error path X-Git-Tag: firefly_0821_release~9833^2~794^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ef256176c7ede53741ad8c0231db0cc46c0cfce5;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c index dbe280153f9e..d73f84ba0f08 100644 --- a/drivers/mfd/ucb1400_core.c +++ b/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: