Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp749941rdb; Fri, 17 Nov 2023 11:29:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTiFM+5B9z8U7BqORnLinaF3wjNjGbabtgZJsAvhCElaV+QVlI18sagAz2msyMpAp6cU9k X-Received: by 2002:aa7:da0d:0:b0:540:97b5:3719 with SMTP id r13-20020aa7da0d000000b0054097b53719mr6170eds.25.1700249396725; Fri, 17 Nov 2023 11:29:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700249396; cv=none; d=google.com; s=arc-20160816; b=w8iS9yWojAsNbg6046DO4aimGkUNhNt5kjif1w8JA3KtEXawdo3RniwX2KF75b/66w 9plImANgwJ9EMSU2EaUED+TbcbPXBPm9mSbu2M5kPhSWLIKryhxwE6iNn7BxwtNE3SBl Rhvv+56wESlAm/DgtYYg/dHNobF1U6qzT0JLcuZtLbM0CMpaGH+4+d8HAW5gO5sZmyuV Wc9FR+xeB6xYYqUIr4hhaWtZpYbAcQqodPUn1m3aUtBnLVV2aOocwoRB9a0v/KUJ0f6/ /fQF3YgCAs5nX4NMY6uK26UxA433SfUiekdDqHeBn0yMQxkrMMsUvOmXFi9fNt+fFj+2 3xBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=7ZtpR5VBZnnk4soDSw6IwamiHkMHtshmq2RkQ7zs14Y=; fh=+EPRnW7LLhav3M4TDPTk2YCakYwV/ql+7yf8yHunfOo=; b=aXGwL/KNcFJQssRT4PGFMUHLb8JTtL1+lW/M/Ines16c5iFUAVbWxCa7a+n/AfCAS0 QCUQHtkZkHfvEp0iNyD6rBpvpSJfoRqmF1hhJ0vsPsM0pDc9NDlwatDCJcuF+xNr7Rvu sYK534t8tDphfTnQ6o7zelT9HpXvQf+T7phGM27WuPX9fBcbr8qSg1I63+GU29R+kVj2 ncFzniWH04ryiFJDfuPFayCThDm5kIkINWpROeHLKC9RI3TYPomK6PruOy6XJPL74Rjr l95Vw0Br3/pl+S8Ii1razYb7ls4/cpEOJ36G5keVGY/7F95W7hJKf+PuIPQymsDvRxVB s5uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=PEG1Ry6b; spf=pass (google.com: domain of linux-bluetooth+bounces-105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p17-20020aa7cc91000000b0054362d75f1asi1188640edt.282.2023.11.17.11.29.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 11:29:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=PEG1Ry6b; spf=pass (google.com: domain of linux-bluetooth+bounces-105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 72B141F23307 for ; Fri, 17 Nov 2023 19:29:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63FC73A8FA; Fri, 17 Nov 2023 19:29:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PEG1Ry6b" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85005D4F for ; Fri, 17 Nov 2023 11:29:43 -0800 (PST) Received: by mail-pf1-x449.google.com with SMTP id d2e1a72fcca58-6b74afe92dbso2776177b3a.1 for ; Fri, 17 Nov 2023 11:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700249383; x=1700854183; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=7ZtpR5VBZnnk4soDSw6IwamiHkMHtshmq2RkQ7zs14Y=; b=PEG1Ry6bk3xe23gXUeibAY60PYqMqIFQf5RkDsat2en1DIbkh8m+ExE0T7nNCW/4EE ZtoQPu/C4Lr8jLphqOa2txNnNCcBLZiTb5a/hy7W/1mMc7K+6TfVMtrRm9oOhtb4rh/W BA+vmEo9J4FkbYXB39b4Ookem5y3SoNnl3ANXMRt4YeH7WTW/tXp2/0s4lBiNehtqYoX XAsTVliTDHixJb05WFDWVWyp7CwBKo/Fuf2MNU9GC/ClnI9WeYcNpkDOYuWmWJVyep06 7ioEMhSJ2br8iHgdkNLbBBlBX4CACOEUo8RjNwPsz6VOlMKlrPTrIQhkUOT34g51crBk Jvrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700249383; x=1700854183; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7ZtpR5VBZnnk4soDSw6IwamiHkMHtshmq2RkQ7zs14Y=; b=Y0/4HD2DQt8qyOOkU63GwR9g09/zx2duEE4KJoAg1rvY9XR/0BapWtN2g1x4iEIqln xM5HlTPvXe+4EcfakLnAkKY/yVP8+euTbrWe5JZxW/80g5vxzEZ3dxwF8tTLYmV1qvVO SVGGUsS50kZfU1jVbBGP+KQ9L/vLIdq9LHGDuk2M547+14+qAiIrv37LAKb5O1qQXpBb X3qIcbRwJUs3W0VS+f62yvfiOuUURVkvysFkNZfNtbo0g5kYzbi3yjd88/vHRH5w11zG TahsNqihiPyDY3TYsDmsdCrtt1Tzi1vk0X6b7H6CGwfieJinj5hjmerPmQASfeSPnxPJ vcKQ== X-Gm-Message-State: AOJu0YwM2/mfqpthwNT2R4cBSG/1NaVy6L1tDwrbVl1dmpzzO5AeAC2M QQ466aCDcWSoJsrzOWSiUc+08FUeOLmJ7w== X-Received: from mmandlik-cloudtop.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:2893]) (user=mmandlik job=sendgmr) by 2002:a05:6a00:8d93:b0:6c6:b762:ad83 with SMTP id im19-20020a056a008d9300b006c6b762ad83mr112843pfb.0.1700249382992; Fri, 17 Nov 2023 11:29:42 -0800 (PST) Date: Fri, 17 Nov 2023 11:28:33 -0800 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.rc0.421.g78406f8d94-goog Message-ID: <20231117112833.v2.1.I4c7ab22148e168e3cde00f27b89748ff4bc651c2@changeid> Subject: [PATCH v2 1/2] Bluetooth: btusb: Return when coredump trigger cmd fails From: Manish Mandlik To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, linux-bluetooth@vger.kernel.org, Manish Mandlik , Johan Hedberg , Tim Jiang , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Avoid freeing NULL skb when hci command fails. Fixes: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support") Signed-off-by: Manish Mandlik --- Changes in v2: - Fixed a typo in error log in btusb_coredump_qca() drivers/bluetooth/btusb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index b8e9de887b5d..35a26440cabd 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3463,8 +3463,11 @@ static void btusb_coredump_qca(struct hci_dev *hdev) struct sk_buff *skb; skb = __hci_cmd_sync(hdev, 0xfc0c, 1, param, HCI_CMD_TIMEOUT); - if (IS_ERR(skb)) - bt_dev_err(hdev, "%s: triggle crash failed (%ld)", __func__, PTR_ERR(skb)); + if (IS_ERR(skb)) { + bt_dev_err(hdev, "%s: trigger crash failed (%ld)", __func__, PTR_ERR(skb)); + return; + } + kfree_skb(skb); } -- 2.43.0.rc0.421.g78406f8d94-goog