diff mbox series

[linux-next] Bluetooth: remove redundant variable err

Message ID 20220831155513.305604-1-cui.jinpeng2@zte.com.cn (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [linux-next] Bluetooth: remove redundant variable err | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 81 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

CGEL Aug. 31, 2022, 3:55 p.m. UTC
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

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

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

Patch

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)