From patchwork Wed Mar 23 07:57:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?WWFrZSBZYW5nICjmnajkuprlhYsp?= X-Patchwork-Id: 554671 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07D55C433EF for ; Wed, 23 Mar 2022 07:57:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239516AbiCWH7F (ORCPT ); Wed, 23 Mar 2022 03:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbiCWH7F (ORCPT ); Wed, 23 Mar 2022 03:59:05 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DDBF13FA5; Wed, 23 Mar 2022 00:57:33 -0700 (PDT) X-UUID: b1a6c1c8a392452ab0767a3a4a38d1d4-20220323 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=MIME-Version:Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From; bh=UrrcXBQj40krDAspPWoXp+tYVrZ4DDB/6x5ahEt+j/E=; b=kIHIZZwIXJ24U5qmmimZIF2JvGDSdk9zTTkvoj8sTOymr331U7u8FaWTrVI8/nh1DvB2AFOWjUaeIyRBrBjcGej7WzSFm/M8E24SVdvtEZot2ufXVwu4XZa7ZjIxCGlfK3zfTJSf3aYnlVEk/qYb2EokwH7ZmfB8XnDLRFigwzY=; X-UUID: b1a6c1c8a392452ab0767a3a4a38d1d4-20220323 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1426859568; Wed, 23 Mar 2022 15:57:17 +0800 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Mar 2022 15:57:16 +0800 Received: from APC01-PSA-obe.outbound.protection.outlook.com (172.21.101.239) by mtkmbs10n1.mediatek.com (172.21.101.34) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Wed, 23 Mar 2022 15:57:16 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eCdrc/FOPXRRkJXnISEuRij49I7e7CXhW8qsIbeGbnqNQmViYtEtYOGTcS14D6eIhEas8qALpKB5zurv0qn4xiyVVUp5chZoGl2hDxhF5adHEiqeXpiknhSqc1OMbahQ/M0BDV360hiaO2FlkHNjlHIi+x+eue+zeZfnODNRSQvK1ZPhzHpTilfCcNLb4mVf3TB4wm+dyM1LkV7ELxptPf4Klq4nyYvaA5/wa0oqDk6HvByvPkwD5b7R+lK/wsqY3EQGSyacLFKZflR5KaqirMtzb+98HSoQJZub96Q0IcTAq+T6d6T1g6WMQoFVCveuXnRa+F6hmrmg2u3jbURWRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UrrcXBQj40krDAspPWoXp+tYVrZ4DDB/6x5ahEt+j/E=; b=Ce74ypxN0IBJqVN2luik49QRDiWpU4HFv7c8gfuP9Kl+RnwNBvRcdAs1h9l5D9W4HK3hrr1CU2n74GFdDtc2zbFXMYHxHU8fjuqxO1EMn6jHgnHZd7ySEWs9FNT9mx/h8CNffJv53hkPlWKyw5/LsoAwbgKL9mLnjsJTNctXMCsidAA9e577ZJ4q9/tj5GeeITJghzFjWtVY71dmiu907BNBRJ4P0TZFswAmVs6QrSdx5iChxjGRYEK14J25BpD8lsuZh4CXtJIdk0VK4i8e0ch3zX8HyBoVH7/FYygWvhFDM+asXcZ+Hu/dqUORvmv9pP1j2KJt5dHm1ObX7E9V1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mediatek.com; dmarc=pass action=none header.from=mediatek.com; dkim=pass header.d=mediatek.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mediateko365.onmicrosoft.com; s=selector2-mediateko365-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UrrcXBQj40krDAspPWoXp+tYVrZ4DDB/6x5ahEt+j/E=; b=FRNo/C/vINBr0VMSflSLxyJrafbPC6bGkhOniEgqELbbUqVv6QiwfV/iEZ4nN+E5rKBWh/YR6LAP/5p+M3WNZczIHF+JYkf6UJR47BQK6/etl4ub82k5pzwtCe2h8pfDaEhoKZ+7sPr5MLcGJqbyWd1klJYgy36CapqQbx1zsy0= Received: from TYZPR03MB5278.apcprd03.prod.outlook.com (2603:1096:400:3a::7) by SI2PR03MB5941.apcprd03.prod.outlook.com (2603:1096:4:145::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.8; Wed, 23 Mar 2022 07:57:10 +0000 Received: from TYZPR03MB5278.apcprd03.prod.outlook.com ([fe80::a016:9018:eec:dd58]) by TYZPR03MB5278.apcprd03.prod.outlook.com ([fe80::a016:9018:eec:dd58%8]) with mapi id 15.20.5102.016; Wed, 23 Mar 2022 07:57:09 +0000 From: =?eucgb2312_cn?b?WWFrZSBZYW5nICjR7tHHv8sp?= To: Dan Carpenter , Marcel Holtmann CC: =?unknown-8bit?q?Johan_Hedberg_=3Cjohan=2Ehedberg=40gmail=2Ecom=3E=2C_Lu?= =?unknown-8bit?q?iz_Augusto_von_Dentz_=3Cluiz=2Edentz=40gmail=2Ecom=3E=2C_M?= =?unknown-8bit?q?atthias_Brugger_=3Cmatthias=2Ebgg=40gmail=2Ecom=3E=2C_Sean?= =?unknown-8bit?q?_Wang_=3CSean=2EWang=40mediatek=2Ecom=3E=2C_Mark_Chen_=3Cm?= =?unknown-8bit?q?arkyawenchen=40gmail=2Ecom=3E=2C_=22linux-bluetooth=40vger?= =?unknown-8bit?q?=2Ekernel=2Eorg=22_=3Clinux-bluetooth=40vger=2Ekernel=2Eor?= =?unknown-8bit?q?g=3E=2C_=22linux-mediatek=40lists=2Einfradead=2Eorg=22__?= =?unknown-8bit?q?=3Clinux-mediatek=40lists=2Einfradead=2Eorg=3E=2C_=22kerne?= =?unknown-8bit?q?l-janitors=40vger=2Ekernel=2Eorg=22_=3Ckernel-janitors=40v?= =?unknown-8bit?q?ger=2Ekernel=2Eorg=3E=2C_Miles_Chen_=28=EA=90=C3=F1=98=E5?= =?unknown-8bit?q?=29__=3CMiles=2EChen=40mediatek=2Ecom=3E?= Subject: =?eucgb2312_cn?b?u9i4tDogW1BBVENIXSBCbHVldG9vdGg6IG10NzkyMXM6IGZpeCBhIE5V?= =?eucgb2312_cn?b?TEwgY2hlY2s=?= Thread-Topic: [PATCH] Bluetooth: mt7921s: fix a NULL check Thread-Index: AQHYPop7FGoCYwarBk2AiClx49hATKzMmLXQ Date: Wed, 23 Mar 2022 07:57:09 +0000 Message-ID: References: <20220323074830.GA4639@kili> In-Reply-To: <20220323074830.GA4639@kili> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcbXRrMDc1NDBcYXBwZGF0YVxyb2FtaW5nXDA5ZDg0OWI2LTMyZDMtNGE0MC04NWVlLTZiODRiYTI5ZTM1Ylxtc2dzXG1zZy1kNTk4MjMzMS1hYTdlLTExZWMtYjY4Mi1jOGQ5ZDIxNTcyNGJcYW1lLXRlc3RcZDU5ODIzMzItYWE3ZS0xMWVjLWI2ODItYzhkOWQyMTU3MjRiYm9keS50eHQiIHN6PSIxNDc3IiB0PSIxMzI5MjQ5NTgyNzgwODIzMjEiIGg9IlFEYzNhR3lTZldpTUNSanFpUzdoc0dTcDk0dz0iIGlkPSIiIGJsPSIwIiBibz0iMSIvPjwvbWV0YT4= x-dg-rorf: true authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mediatek.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 326750df-e404-4d74-2b03-08da0ca2bbb1 x-ms-traffictypediagnostic: SI2PR03MB5941:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4Dx1MgGKcqBrsFxT24g0of95yq8qI7RylsJ45XYy7y2WbmlPrKe32PSqACMUMLnuhBZlREiKD85akYMlD5B4LhcXXBpUKU8JXsSiEQNlZO1H/DNwitn8zDfrT0Cax/d/60dTSX1GqWwGES4zt0XqN6jpXBqi2nZmEP6Jk4NiYjwUhm4Y3XlSn8oOZ48cmELFXEoJ2SM2ELH8Tdk1Uq9v7aexSCA1jKu2sPwT/HmflcppB/qIYawoMol4aiTuycNFHqYVsS7KA/3G4jv9n3ng25DnredqFVRxflJTp965mbvAIcQmvCPEw5ki1jaRkf1ZL7+Zc6bVjQ5Zah3moYoYXvEC6rg4bOMzdIYn1xkKJKFz6VUvit7l6dm/yemW6iPEsRvYYmug8oOc9y68E09UuPq5yipYwdnb5Lpki092043cOal1qlwGUfYLVzno6ODT5yAULbzdj0fXZ0w9fnkMeVyZvIj2zqIUcMNd3q9IrtZXEBigME0ot9KOZyK9Zpm0h3pMGvxMgT3suFDsEE7+TdeR+0duD4aMjkZWiqAhftSiwQp+nbSTQd5/RFbGo0K2FmMTc3wO2UqbJXIyYJ+xBWyTjh9Qsx9wdYYiwr/zZg6qh9MKwqVvoRtKYlwbMC4v4A+gV0x3WRomVD0ztJ40v2A+cWr1/Bsm95EQC53Rwri0HiekZgt6xwntyGbjFmpKF7LMPS5VQq/eThEx9LVZnw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR03MB5278.apcprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(9686003)(33656002)(107886003)(186003)(2906002)(6506007)(4326008)(26005)(7696005)(83380400001)(5660300002)(52536014)(8936002)(86362001)(508600001)(71200400001)(316002)(224303003)(85182001)(38070700005)(38100700002)(122000001)(54906003)(76116006)(66946007)(66556008)(66446008)(110136005)(66476007)(64756008)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?VmtNNGV6VlZNSFRaaHlrS1FM?= =?eucgb2312_cn?b?aS9yVFQyME45eWtHMkU4UHowcjFlZ0EvWHNTeC9Ld3F1OWJjdkZXK2o0amJ3Q3Qx?= =?eucgb2312_cn?b?aDBFKzM1QlFlSGhZczQ0RHV4ODNTQzJFWVVRTlFBRHFyNXJyd09HUVhxcHh4NWFu?= =?eucgb2312_cn?b?akpGYzZRWW1aUGNNb0dialp6aDJkNXg4c1RxU0h0dzhRb2xWakVXL1NCclhoQ0lK?= =?eucgb2312_cn?b?d3BIcmNmd09ZTzRIaC9YQ1d3Vm44dTlGU3pUb0pGSlEzL3J6RGdNdHVoNWdWdlkv?= =?eucgb2312_cn?b?aHMyaXovaWcwWjJFeUcyTnBoYndZMzkvS0kvUmZKaDA1LzQxWXFpVHhDZ2U1blRk?= =?eucgb2312_cn?b?anRMZWlHenV1QWJGVEpqUE9oTytjNmo2RnF4QTBqejBKYUlQd1FDUG5PWklMSTNN?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wZ0dRVFVxcWV5TWxUczdwd01Wd1pZNk5HRkk0S0xxY3d6MXo3aTBVOC8yMUlW?= =?eucgb2312_cn?b?L0kxQnd6NlEwZ3lUWFRFZWV1NnBwNFJqQzZ6SDFJczY5WGJoaFByTEViM05McVd3?= =?eucgb2312_cn?b?bDJwM1BqRkM1bVJyRlROWVVHWGhTTXVGRmZ3MG1BSmppTThpdnJzSEZFVklXUTZu?= =?eucgb2312_cn?b?R0FJWVVqNEdJTXB1MTlkaFg3T0JXV2tKU3Q2ZCtLZEZlYjAycmN3QmVWTGxzbGFO?= =?eucgb2312_cn?b?VFhWamNRNDZXUE8vOHQ4WnFkQmU0Ykh1N3lJT0JUcHBkZkxuNnRveUlmYTZZL0Rq?= =?eucgb2312_cn?b?ZVcrZSt4WTBhY3o2RUFhVVFadVoxS3FBa1hNOVJISjN1akNQODhGTWpzazZPSktz?= =?eucgb2312_cn?b?eHc0M1FwOFB0T3l6R3JwMjhZSXJITW9ScURsaEJSVERpSTluOUJvaUZNTjgyK1pX?= =?eucgb2312_cn?b?T3h6citOSHhxcHZxb3p3ZnJUSVFPaUM3SnJ3V1lXU2w5aitaSDd1T2dKZGwzSnZn?= =?eucgb2312_cn?b?TmRlMHdZaVhRQnFBYmU3cFVnb3ZPQnhGYWtyK056aFlVYXJmcnhOd3RqOVE3WWRl?= =?eucgb2312_cn?b?Q1dsUVRpTVdhZ0o5ZXJVRWRIWTRiNHJ0Wjg2N1N6aVJXMHJLcVcvbHU5UDZqRzNp?= =?eucgb2312_cn?b?enZVQXlqQ0lPWkwxL3BvSDRPNkFLM0FyQjZjWmNxY2pubFVSbVRRMFZxVDZRUTBj?= =?eucgb2312_cn?b?ZC9SV3ZTQkp5WFRScFQ=?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB5278.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 326750df-e404-4d74-2b03-08da0ca2bbb1 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2022 07:57:09.7032 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a7687ede-7a6b-4ef6-bace-642f677fbe31 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FD0xI9ZW1xERjWlScQuuWd0mZAgZPhNHka0Oys4HSKsi04fDMP5aoImWgvAoImaGyU0Q0YL7J0MHUYuul8yXXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR03MB5941 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Dan, Thanks for fixing this issue, we will update patch. -----邮件原件----- 发件人: Dan Carpenter 发送时间: 2022年3月23日 15:49 收件人: Marcel Holtmann ; Yake Yang (杨亚克) 抄送: Johan Hedberg ; Luiz Augusto von Dentz ; Matthias Brugger ; Sean Wang ; Mark Chen ; linux-bluetooth@vger.kernel.org; linux-mediatek@lists.infradead.org; kernel-janitors@vger.kernel.org 主题: [PATCH] Bluetooth: mt7921s: fix a NULL check There is a typo in the NULL check so it's never true. It should be checking "*ven_data" instead of "ven_data". Fixes: 3cabc5ca2c9d ("Bluetooth: mt7921s: Add .btmtk_get_codec_config_data") Signed-off-by: Dan Carpenter --- drivers/bluetooth/btmtksdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index f3dc5881fff7..b6d77e04240c 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -961,7 +961,7 @@ static int btmtksdio_get_codec_config_data(struct hci_dev *hdev, } *ven_data = kmalloc(sizeof(__u8), GFP_KERNEL); - if (!ven_data) { + if (!*ven_data) { err = -ENOMEM; goto error; }