From patchwork Wed Jun 26 02:53:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Lu X-Patchwork-Id: 807586 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F7613AC16; Wed, 26 Jun 2024 02:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719370429; cv=none; b=pLrcZzl33Tcmz04oj52NjiNPiYjK2Y5L5Ayjuu+MyIeBnHD7wYiRM49WXYgvmoN4ClYOg8igPTDR/v5WX6NgWJDuHl8kGGr1XbfPZ2fQJaFZaNtsK0/elJGWFioXdTDi019g3anoGr5CcEITHESLYZN7p2W9jLdCedgWILgBxrs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719370429; c=relaxed/simple; bh=uCu68Z1bpcRG5OT0Z3gl5xWAnsWzMuJTChZVlqhueZQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WUoE4Cx8K1X9tdMewlkbUABiRaVQWdtsUshIGm7AcKo6e3+FyInNWnriiJfo/reY5DDnasCkXb1Qzd1riqUVYilE+ZovVKiIU+4UHjrQO/KuQYQvRja/en5GRivdTrqcWUS73e2BN3tWc2X2hPQbOCwNENGpF3APBzvipnsx4vo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=Tw/h5QZS; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="Tw/h5QZS" X-UUID: 4ae0693a336711ef99dc3f8fac2c3230-20240626 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=rz5boOxsi/u+gkabvKEweLBuuQ8l1CKIHW5Q1pnKZyU=; b=Tw/h5QZSOo9UCHJC5nbcOavDAG7WX50x9rhSzV7dI9Hjp+iGkO8Iczp6fcHbCEuSzWSXxXAtJEaxTO1NTM0F3EIiSrwBfcCF34PdqTz5B4WiEXan3rbtYCP1TnO6bxn5MYECgH6PstoSR65x/z7O3Hk43DLa7B9C+6AFnJ2TDOM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.39, REQID:2b917a1b-2bfa-49bc-932b-eb43119b5194, IP:0, U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:393d96e, CLOUDID:79b08985-4f93-4875-95e7-8c66ea833d57, B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES :1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: 4ae0693a336711ef99dc3f8fac2c3230-20240626 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1532659577; Wed, 26 Jun 2024 10:53:40 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 26 Jun 2024 10:53:39 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 26 Jun 2024 10:53:39 +0800 From: Chris Lu To: Marcel Holtmann , Johan Hedberg , Luiz Von Dentz CC: Sean Wang , Aaron Hou , Steve Lee , linux-bluetooth , linux-kernel , linux-mediatek , Chris Lu Subject: [PATCH v5 1/8] Bluetooth: btusb: mediatek: remove the unnecessary goto tag Date: Wed, 26 Jun 2024 10:53:22 +0800 Message-ID: <20240626025329.26424-2-chris.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240626025329.26424-1-chris.lu@mediatek.com> References: <20240626025329.26424-1-chris.lu@mediatek.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove the unnecessary goto tag whether there is an error or not, we have to free the buffer at the end of the function. Signed-off-by: Sean Wang Signed-off-by: Chris Lu --- drivers/bluetooth/btusb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 79aefdb3324d..fcdd660add19 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2953,12 +2953,9 @@ static int btusb_mtk_uhw_reg_write(struct btusb_data *data, u32 reg, u32 val) 0x5E, reg >> 16, reg & 0xffff, buf, 4, USB_CTRL_SET_TIMEOUT); - if (err < 0) { + if (err < 0) bt_dev_err(hdev, "Failed to write uhw reg(%d)", err); - goto err_free_buf; - } -err_free_buf: kfree(buf); return err;