Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4411125rdh; Wed, 29 Nov 2023 00:08:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXruPYYEFgEcD6XtMBbccqYpPb+CEkhBsj7qsOpz/DoIaHm4IoqAEHZKrxzKXRO9+UfoSc X-Received: by 2002:a05:622a:241:b0:423:8287:dc68 with SMTP id c1-20020a05622a024100b004238287dc68mr19163813qtx.52.1701245281890; Wed, 29 Nov 2023 00:08:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701245281; cv=none; d=google.com; s=arc-20160816; b=wVDNeuwiInPv1ERolJbrb+Fu1PBy9XVHUQSbKUJoVwVQpU81GYV3vY6jd47+PG+fmC OIi0FWXNUGnbEwMOpQFs8N7UcCilbVqMb+CrI14z1Jm2ap/QFmkQLInw3nj/oltYjb1D e70UaPgkA7CDQwS6SH2c62NBPRGLluKHZNO9QO4tx7regbV+Tu1k3dMDIql9F19a33yP IuX5S5J5tQfykRtDRfxpA5qPuQRYSRNb2ts2AZtBYETZQpB4CyEsvhAbrBUpYZxa0DmK avq+aKdFKAH5GzbXqZBCL0OF4AdiROTDQlHSAEW3vnNeANg2nQXsEBffvPabLv3NJ9VS /BFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UdXxIm20CMp25OlGrffrUgJTYDUDbBe+vI4+30bSar8=; fh=BdtV4WWvdeOOMk2W4ImEsw3PhwepPbDG8b+UjxYkMiE=; b=FLjWE9zkizDrGG673qlxib7S8VT7/xBBb7w3+9U5XFHBaU8WgwK0hRnSnvsijKhabv c0N0L/Yw/zcawcMVUU2fQd4H5hi2Ms5tALVyn9ZwefK6ZFbxTD3HznMt+EuOCBh36mrI o2HH8V9dLEbfKV0Blrxg0NkrXKukPFwriPi/yeStkNDSw8A3TVoHW1Nv+7uK7janiE4e AiBkAenDZho52QXvO3mksRwF7r+7bvliViO1UEVbEiJprKtG3Am6skLiz2J4cJ6Ho270 3nushh3N6Q+fR1mCpG68Rh2p6XdaGkMNFHPLHYbg2a1soggu+acRdIYmGgm09nFKUfNi dmxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=a0qdLpZf; spf=pass (google.com: domain of linux-bluetooth+bounces-280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e9-20020ac85989000000b0042377b37d2csi13134730qte.713.2023.11.29.00.08.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:08:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=a0qdLpZf; spf=pass (google.com: domain of linux-bluetooth+bounces-280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 974A71C20964 for ; Wed, 29 Nov 2023 08:08:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6648D11731; Wed, 29 Nov 2023 08:07:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="a0qdLpZf" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FB51172E for ; Wed, 29 Nov 2023 00:07:54 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AT4S3GG013935; Wed, 29 Nov 2023 08:07:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=UdXxIm20CMp25OlGrffrUgJTYDUDbBe+vI4+30bSar8=; b=a0qdLpZfzfaLBW3YDpGv0Xk3DskZs6BRlc/TSnyfUpV2r8FPKPqSj0Aa19vZAMf9Bop9 MIi8Bbc92AguYmVrIIvANh8KHZWVTxXzLyAfYAXExJsqF4r9Pvx6ZbHqnQl51hHQ3PZU KrblWzwFc4txDlaf8m11donETd2PYD2CsP0bTV8F9xq4Hkdhn0Wzwl5XyScJsSxrRUbb 3YCVgp+oBp1HYOv+ShoGqqDt1+7T4bEWoEZxaxpu75l1DZf+BXQQfEG2QTrGnnZxDnh6 KCehTN9o/njhBUny9bqtzEMX8Kc3ICsln6nO4kfF1aZj9ZBPc1IvBVPEXwfmvGhmP2GB pg== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ungruancp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 08:07:44 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AT87hpY009441 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 08:07:43 GMT Received: from zijuhu-gv.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 29 Nov 2023 00:07:41 -0800 From: Zijun Hu To: , , CC: , , Zijun Hu Subject: [PATCH v2 1/2] Bluetooth: hci_conn: Check non NULL before calling hdev->get_codec_config_data() Date: Wed, 29 Nov 2023 16:07:34 +0800 Message-ID: <1701245255-12409-2-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1701245255-12409-1-git-send-email-quic_zijuhu@quicinc.com> References: <1699251565-28759-1-git-send-email-quic_zijuhu@quicinc.com> <1701245255-12409-1-git-send-email-quic_zijuhu@quicinc.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: vUGP6xaZKf7o6bey94EZSSWQiAM2UiAC X-Proofpoint-ORIG-GUID: vUGP6xaZKf7o6bey94EZSSWQiAM2UiAC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-29_05,2023-11-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 adultscore=0 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311290059 Explicitly add non NULL checking before calling hdev->get_codec_config_data(). Signed-off-by: Zijun Hu --- net/bluetooth/hci_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index a09071059214..21b59d674717 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -346,7 +346,7 @@ static int hci_enhanced_setup_sync(struct hci_dev *hdev, void *data) bt_dev_dbg(hdev, "hcon %p", conn); /* for offload use case, codec needs to configured before opening SCO */ - if (conn->codec.data_path) + if (conn->codec.data_path && hdev->get_codec_config_data) configure_datapath_sync(hdev, &conn->codec); conn->state = BT_CONNECT; -- The Qualcomm Innovation Center