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>] [day] [month] [year] [list]
Message-Id: <20220831155513.305604-1-cui.jinpeng2@zte.com.cn>
Date:   Wed, 31 Aug 2022 15:55:13 +0000
From:   cgel.zte@...il.com
To:     marcel@...tmann.org, johan.hedberg@...il.com, luiz.dentz@...il.com
Cc:     davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, linux-bluetooth@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jinpeng Cui <cui.jinpeng2@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] Bluetooth: remove redundant variable err

From: Jinpeng Cui <cui.jinpeng2@....com.cn>

Return value directly from hci_req_run_skb() instead of
getting value from redundant variable err.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@....com.cn>
---
 net/bluetooth/msft.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index bee6a4c656be..53872f9600f4 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -819,16 +819,14 @@ int msft_set_filter_enable(struct hci_dev *hdev, bool enable)
 {
 	struct hci_request req;
 	struct msft_data *msft = hdev->msft_data;
-	int err;
 
 	if (!msft)
 		return -EOPNOTSUPP;
 
 	hci_req_init(&req, hdev);
 	msft_req_add_set_filter_enable(&req, enable);
-	err = hci_req_run_skb(&req, msft_le_set_advertisement_filter_enable_cb);
 
-	return err;
+	return hci_req_run_skb(&req, msft_le_set_advertisement_filter_enable_cb);
 }
 
 bool msft_curve_validity(struct hci_dev *hdev)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ