Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2420910pxp; Mon, 21 Mar 2022 19:54:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDF7+Pm4TY9+tZtd9L85HKUmqmswHhC9SWdNol8WI7lvuUPgb92UPulILyg3t/94E7johC X-Received: by 2002:a05:6a00:18aa:b0:4fa:ac2e:a969 with SMTP id x42-20020a056a0018aa00b004faac2ea969mr5001213pfh.27.1647917683661; Mon, 21 Mar 2022 19:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647917683; cv=none; d=google.com; s=arc-20160816; b=f56LvVQCQB8TRPeqRlf997E5KFhKTT97rva1shjhR9sif04gT2mZ8+nLrRP92km19S /vlHq0Ih8MpHFFBCybItI2uQSGh4fCDRacxZ4iKivsyXMA9Ale/EzvzDicogk4RWv2Pf zDKK8Oqysc4SXgugas0O9Y9kWt8qE6ETYCY/Al4UrX45zXzbKVKSTkQV5teSgs22KzuU /RcBr4vHILPT7xIrsNginHehBzvV4O86mGro9xlsDmTJ6zFCWptGJkqWylKufJGY5pNF 95JwrzQX8+n62PqYVTiMYgheoVlZMl8vc31gB1+y5DpqtfUirNc/oIb7lTOXEe/pr/yW Gh6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=CGNE9Hu2ocFWLA9aizXruzg9ykT4gphFqtIA1cS4KVI=; b=QwYYKe1NFzlqErgik/7NYkrMziZOJFKWIRNR0jzet1enEJt8gew5VvYJ2k+aaaDsFK 8jRbIbCXaHJcUWG6wT0s6mHaaNW97wNu5Fotln4VaA+0GwOKuizY0pERvQI+DasvTWm9 Q1+R/wJpvDW+8KH+7wbcFuedFwytWmqxK2tQNU5qlO97yMUI9C5iFN+EQ/NLFlYn5wZa c6HIMqzKiHQ1aZJMua0/3tKkZySiiQSbeVoMh0HD6knX/oTdgkYFJK+0ZTU86KVwj9Fw aNThwsulNVjcjSeDsjpQUKnGzAUCx62/grXvpizCnF7y5nVSy9+ZDwaaOrEez4w7uLNz /tAg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p3-20020a170902b08300b00153b2d1660fsi11812177plr.535.2022.03.21.19.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 19:54:43 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9A92232B5B7; Mon, 21 Mar 2022 19:27:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235439AbiCVC3H (ORCPT + 99 others); Mon, 21 Mar 2022 22:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235298AbiCVC3E (ORCPT ); Mon, 21 Mar 2022 22:29:04 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DD9038222F for ; Mon, 21 Mar 2022 19:27:33 -0700 (PDT) Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KMwLs5S3SzCr29; Tue, 22 Mar 2022 10:25:25 +0800 (CST) Received: from dggpeml500003.china.huawei.com (7.185.36.200) by dggpeml500026.china.huawei.com (7.185.36.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 22 Mar 2022 10:27:31 +0800 Received: from huawei.com (10.175.103.91) by dggpeml500003.china.huawei.com (7.185.36.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 22 Mar 2022 10:27:31 +0800 From: Yu Liao To: , , CC: , Subject: [PATCH] Bluetooth: mt7921s: Fix a wrong judgment in btmtksdio_get_codec_config_data() Date: Tue, 22 Mar 2022 10:36:30 +0800 Message-ID: <20220322023630.1239271-1-liaoyu15@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500003.china.huawei.com (7.185.36.200) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since ven_data is a double pointer, it should be *ven_data here. Fixes: f41b91fa1783 ("Bluetooth: mt7921s: Add .btmtk_get_codec_config_data") Signed-off-by: Yu Liao --- drivers/bluetooth/btmtksdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1