Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp357864lqh; Sat, 4 May 2024 04:26:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzl2F58insogS3t+BQwvLXqTvYcV6nJhqPqGJKuZLZIBWE9mP+fm90cCcOa/chCDTTV4kkaaSmHJAF+EyRb5idPbfasDLZAb/nMp0zQw== X-Google-Smtp-Source: AGHT+IEjNFbFef3rj2qh5zUrmJke6FNFzowcIWIVlEdFRYqneCF7GWheWWft79nxD2mS4BB1B0J+ X-Received: by 2002:a05:622a:64b:b0:43a:b15a:ee51 with SMTP id a11-20020a05622a064b00b0043ab15aee51mr5113704qtb.31.1714821962604; Sat, 04 May 2024 04:26:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714821962; cv=pass; d=google.com; s=arc-20160816; b=k0DVTd5Yk1cZGYwN1SPtXKFpbrPEVO/YqQls1/t5PbQMNN+BIrFYKsSpU08BEMJNFg pKcR9g7w8ys8vGnWRVecrMBzIjYnfGouWv3rio7D6r5Fb3eF/CHb5H8niJjsJozPhQAw JbKavNG8jiB9yJh57xDahSv1EW6fz6NmiSPLRBOQFyKO0iHPB38x08icUyYRrihD03Vd ewc6oMUwNpKXHbvoF4cOZ3D1UUqKtZ3/mbCWM6GuioUFt6+vJ9ptrLSUVRq+H8Un5zvj djpbWkK/Y/cYRLt8kyFVwo6Pqr9FytNrBXSVfElZkae/c6dmd6DBNqocARMsYDjhRIwT kSTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=xzT/pgsXlCPnmBQoa3l3jmnuAByrCDFjM0ki/8uzIUY=; fh=j34EO6DVLdUMu9pAxBMN/4DJ3sZbLTRR8Q0oLO/TXnY=; b=NFzRgNQ8hydE0Vo5L1gIsh8R3ZHESHX/CAxYJCL7l4YAADwSUMjXfJYDRfx4Yv+izc yzMBBxr6VHyilHzxJkg1/zApa67PqfsmBfcWJ1n3O8pe3nJDxEan3PdBsoayhq/W0Zov Z27OXTe4SUfck1Zj22ncNvMKkhqmNnps2SkywxWuFlejcW4b5q66lsNhnzsXXOxGnBRu cmkwyZtuMWz0SKNt/rXp4AoO+R7jGxa9CaB/cyXRN+ZGZmEvPT9AjwyArEijpvR4TwT/ 8D6zhMf5GLFWYhVvmCM0xt4VHCRkAUycNrPt5F7G88SRXh7CengS7KHoCqf2nGIVzXqa UU2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nt7oHHwm; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h19-20020ac85e13000000b0043adb38636asi5254183qtx.505.2024.05.04.04.26.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 04:26:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nt7oHHwm; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5154F1C21078 for ; Sat, 4 May 2024 11:26:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3C3A1CD16; Sat, 4 May 2024 11:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Nt7oHHwm" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD7521946F for ; Sat, 4 May 2024 11:25:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714821953; cv=none; b=oi74AtD13HX70L03fcBpB2AWvvgSq3MrlLqWEFkqLlaZfP2xwWhndELjFTAN3CtHik+o3qYfsrTq20QQS8dTlbcxOvC9dQIvLJAPvD2C0glN49CWe6YaAjPBd8TwLeCNQgWL8rFow+DsR3xtX7KilO0hkiYaoHDcMYhmnhN9KHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714821953; c=relaxed/simple; bh=4R6lWWk4F+MSTfFJIUE3nMNDvuJ039zVA/52AkBhpQc=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=RbEJDLX3uokfr8MxSdSn71v6lk/JlpICsPmG67/5KIlBuY/Mpq8beEYqEe5D42JDde6dzCtwXpuU/2cKhFS8CHWRNEYQ9P94txKeLTCZjAcyKNDJxX9cyLoJnOiIXyVSQk8/NmeIwoMclNFT3lJdnrdDc3nlRRUpMKUFTZfpGX8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Nt7oHHwm; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-41b79451153so4468365e9.2 for ; Sat, 04 May 2024 04:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714821950; x=1715426750; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=xzT/pgsXlCPnmBQoa3l3jmnuAByrCDFjM0ki/8uzIUY=; b=Nt7oHHwml419tXSbhTICgpcX6SusKMcAuWDs65Ww2Mz5+EW2/SvnktPeoc2iq3uYfv 4ZHwfGRCD+2gFqCUXpmUcgDaAxdT1+dBgUArwO4IvWQwZph5Z7ZRPs0p0xmpO/zYZDbM zXNC8flE5j3FOvFapuXIcW4E3s+1m6f1pnZ0yqQW1gKVlCz0TvYG2zauFM334MOMlQNp lMjAcL+apJJ/plTiEvC/Otm0pkU8Q6d1D1MpoOOp/rfUAloQ25Wrey0qoV1QSycqccZL XOqY/ss0+bCoLm4Oet4ea2kMnwij4Q27RHjPlXq9SHKMh5whVHKIr9nLdyoyKoQicHGF mYAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714821950; x=1715426750; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xzT/pgsXlCPnmBQoa3l3jmnuAByrCDFjM0ki/8uzIUY=; b=Z8Y+PGkNH7CF+ULdNhpmNaw6nza9oTjOlf6eDcpwwO/ybWdjtio1GJ443M91e6z5AG 6QUEFzTylGzwh61IpP9jR6AD23eKgtVU9rFc9ITWjHG/l9IuVluQzycezTuztKaCU2jJ 9W8wxF2Kje4oDKlt6zxXzecgn+WHkrzp63ZjBnUMlQbuu8k9JSN2MYf5vkd6B6lEcYGr imxQfLsilDD0d0N1o9ABkHU+YWZ69bs+xX0AKREOAxt2xq2tmujcSl/jRaoENQht1M3Z BO3uXqLsHa7fAvMz6nKtF9PBiin5RUPADtzssiGVElospJeS4Vhw1bxaTFytNwta3umz xOxg== X-Forwarded-Encrypted: i=1; AJvYcCXaKxFyV43SRwYkZnLhnuy1wZISLgJBac4pfBFEjDxWolTDltdFOS/hpeMam9r32cHkxw6tqovhrJ+kZMRhVzYjzHogZtr9kAQFx38FN+v2 X-Gm-Message-State: AOJu0Yyx0jLScO/gHHqAdwHjbxOcJJlPoq1GW85J/wpzn3UoHXJi5WjW VUCepLS6fzSQwOpqxFMktZdVI/nK2skf/RrNo2uE3wstNqVI8n9MUUXhhrhAgAA= X-Received: by 2002:a05:600c:5013:b0:41e:1f78:314d with SMTP id n19-20020a05600c501300b0041e1f78314dmr3578278wmr.24.1714821949781; Sat, 04 May 2024 04:25:49 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id m9-20020a05600c4f4900b0041bf7da4200sm8982436wmq.33.2024.05.04.04.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 04:25:49 -0700 (PDT) Date: Sat, 4 May 2024 14:25:43 +0300 From: Dan Carpenter To: Johan Hovold Cc: Marcel Holtmann , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] Bluetooth: qca: Fix error code in qca_read_fw_build_info() Message-ID: <515be96c-4c44-44d5-891f-fe57275e9f47@moroto.mountain> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding Return -ENOMEM on allocation failure. Don't return success. Fixes: cfc2a7747108 ("Bluetooth: qca: fix info leak when fetching fw build id") Signed-off-by: Dan Carpenter --- drivers/bluetooth/btqca.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index cc61014ffbc9..3b018ee33725 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -136,8 +136,10 @@ static int qca_read_fw_build_info(struct hci_dev *hdev) } build_label = kstrndup(&edl->data[1], build_lbl_len, GFP_KERNEL); - if (!build_label) + if (!build_label) { + err = -ENOMEM; goto out; + } hci_set_fw_info(hdev, "%s", build_label); -- 2.43.0