lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd-q7WCFrO_hW3nGHPj784jMtR9=fEzMqo5uQKapwO2NUA@mail.gmail.com>
Date:	Tue, 23 Oct 2012 13:08:41 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	a.zummo@...ertech.it
Cc:	yongjun_wei@...ndmicro.com.cn, rtc-linux@...glegroups.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH] rtc: avoid calling platform_device_put() twice in test_init()

From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

In case of error, the function test_init() need to call
platform_device_del() instead of platform_device_unregister().
Otherwise, we may call platform_device_put() twice.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
 drivers/rtc/rtc-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 7e96254..209a127 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -164,7 +164,7 @@ static int __init test_init(void)
 	return 0;
 
 exit_device_unregister:
-	platform_device_unregister(test0);
+	platform_device_del(test0);
 
 exit_free_test1:
 	platform_device_put(test1);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ