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: <1563357944-24496-1-git-send-email-dingxiang@cmss.chinamobile.com>
Date:   Wed, 17 Jul 2019 18:05:44 +0800
From:   Ding Xiang <dingxiang@...s.chinamobile.com>
To:     broonie@...nel.org
Cc:     linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] spi: remove redundant put_device

device_unregister will call put_device,
so remove the redundant put_device

Signed-off-by: Ding Xiang <dingxiang@...s.chinamobile.com>
---
 drivers/spi/spi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 75ac046..d753689 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2133,11 +2133,9 @@ static ssize_t spi_slave_store(struct device *dev,
 		return -EINVAL;
 
 	child = device_find_child(&ctlr->dev, NULL, match_true);
-	if (child) {
+	if (child)
 		/* Remove registered slave */
 		device_unregister(child);
-		put_device(child);
-	}
 
 	if (strcmp(name, "(null)")) {
 		/* Register new slave */
-- 
1.9.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ