Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1444177lql; Tue, 12 Mar 2024 19:00:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuFUGVXDtpJKyvJ7lrGzRZrhngeqzx53cHaoUIRIVNZdIqvwpz4PdSZh6oSDcEkPeVHSz14QXaeaFpaFl8cDxpSpu4stGOGo4U9LEkJQ== X-Google-Smtp-Source: AGHT+IHiUShADCeDEAvAJHBkeDKFNwK/Ec98BWKx/OuzEybVEMLoICH+VXTzTIgWXJr1g8ibo9Xk X-Received: by 2002:a17:90a:69e3:b0:29b:e81e:80a7 with SMTP id s90-20020a17090a69e300b0029be81e80a7mr1814924pjj.9.1710295235749; Tue, 12 Mar 2024 19:00:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710295235; cv=pass; d=google.com; s=arc-20160816; b=qGMrXZVYcUPZJfhywgX+yAubaddlcj8saie59sAzH1jOxuphXCORoqas5P1JoV92v9 USWUHzq7WQRz/XGK+KLlj060xMKLPZgCG9rnUsqDTgdwB7UVpUHGc7NwZqH7VyaHmfwH P4wEr1a02m+UfVio8eHZtShN85g0d/4dkh1odIV3OBsBi7mMxey/zs3XugT7co7OgW5o HUrlnUECPL+omKtBmR4lRW4p4nSgGXPl+o8rLINJd2EbikujLd9Y4khDKxXxs6vysMPK 2EeKgwNnz0kwWrQdhE4csksNFOJV8UY8G2ZEbCRIojlth7Yq3uNurHP/k6pjdWjk9Fto AzMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=zZnRoNZ1L3vSFgo24zHN3Fch5vHykbEs1zufJcRsbEI=; fh=/GnZKsCTjGe5oAtpDX9iTnSQczjF8Z5wV3gGDki3N5U=; b=oPKcoE5fmkxQZ54Og4qelwSG41u/4MCnuN3sCl+geBiBzel1rKufU4qyoep2VtUAbK SX5vIQbkDPTyN3PJxcPKJeZkDgooX9H3vozJfnlzvji2tbtlWny+lIkga1IsR9hlyijv q8HZn8DXmO0d99++BG879fi+My6oCxn+p5AqSxwAOhUrcU0F3//cJ4qaVRxBDQkdOCX5 3plVUbIFIk0mpbmyaTYebKzrbMeMGIudt8UVwNfUJuYST6E6NvYgS9AcHYNSfAwKPsqG 5d4tNAy/FpyBNAYa7tyNGjmQtZ3Nw75WCCFASsf9yRTR2k8x+2G9ELrq80VnHdUVWvfs 2vdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2466-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id hc7-20020a17090b318700b0029b848e7d99si447603pjb.155.2024.03.12.19.00.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 19:00:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2466-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2724CB21404 for ; Wed, 13 Mar 2024 01:59:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 164A6B66C; Wed, 13 Mar 2024 01:59:48 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id AEC3E10953 for ; Wed, 13 Mar 2024 01:59:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710295187; cv=none; b=Y7h5rejkUDOuC85nIKFIqxiodLq8HOEghNq/OJjkDlbuE2eoTt4h0jOuvegDG2jWg5lVcYWgiVVMElQTiWsT7ZtQx5deeZwBQS7Vit/74ndaSV20fFVUM36ZXhbyd+Zw0NlR/sN5AHJjclB7/0oD/KvY9kiwn5rmvqivACGJAGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710295187; c=relaxed/simple; bh=20ls82YLtZTjVQoQFdVO2vHSOfswcwvM4SUaEClj+nM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YkDpEGn92dGNWDqMVdoAOKCWrrA9RYEytwso2O45EFZ6fqYMGjZE0BgopIY3KN0E7I+EYp/mrc1R+WC6cvKZqlPpze2cgA0XZJ9ab/2wTFslYG+bh09I0piyQzSV1GovAy7j5ZxiD37mWW7NT456mzR8F/8hzgkUggSen0ycrok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [103.163.180.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 85927601A2DFF; Wed, 13 Mar 2024 09:59:32 +0800 (CST) X-MD-Sfrom: youwan@nfschina.com X-MD-SrcIP: 103.163.180.2 From: Youwan Wang To: marcel@holtmann.org Cc: johan.hedberg@gmail.com, luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org, Youwan Wang Subject: [PATCHI] Bluetooth: btusb: Add return error code Date: Wed, 13 Mar 2024 09:59:14 +0800 Message-Id: <20240313015914.422751-1-youwan@nfschina.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add return error code Signed-off-by: Youwan Wang --- drivers/bluetooth/btusb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index b8e9de887b5d..ec6bdc9687b1 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2826,8 +2826,10 @@ static int btusb_mtk_hci_wmt_sync(struct hci_dev *hdev, goto err_free_wc; } - if (data->evt_skb == NULL) + if (data->evt_skb == NULL) { + err = -ENOBUFS; goto err_free_wc; + } /* Parse and handle the return WMT event */ wmt_evt = (struct btmtk_hci_wmt_evt *)data->evt_skb->data; -- 2.25.1