From patchwork Thu Feb 8 10:17:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 198272 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp66838dyd; Thu, 8 Feb 2024 02:18:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYs1nA9HTF5Cbi0VI+teXIAElBbLBbQnsduquGESely8JG55ufgcTYkuN4SQ2kOZ3l/1DQBtBtRlDC7EPihWgCtkpyOg== X-Google-Smtp-Source: AGHT+IGMAvYIITrptTQ3Um5tI8jYkKLnqW+sKqLVX8UzbjvZ4Mtcl3pRbG0ga+gEiXsEufACTG8x X-Received: by 2002:a81:4956:0:b0:5ff:a52b:55ac with SMTP id w83-20020a814956000000b005ffa52b55acmr7512562ywa.34.1707387492693; Thu, 08 Feb 2024 02:18:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707387492; cv=pass; d=google.com; s=arc-20160816; b=qATetwmg/zfN+cSVNmvSk/lKMorkB+P1l/d4Zg2AK2idjHFd5KLQKLbETeto2cH18Y i4tW9OFMx7uzd9Yts8d1bqu5IBgvkICIXB7Tt1Ebvk9f0Es602e9rLiVXJnKrKkdZb7p o8NddgwiBE4g+foNu6FCIM2w53Qk2RNmfnB4aPCdCY87iIO5tZzXW1CH+PwE8+5p8pU7 hL64NGMpFMY0Yc87ahTWfN3r4Hvz/TFYmMr6JRqMrwYkojhCKSL8so53oc7m7YNofTO9 DRVlqJHVCFjQiS+pxc8043F/mLxKvSCAHCqHhijSWhWsc6QOlX+tID+gsT/YkgHbfATP ZcuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=mExta14h3FfRuo79nR/+ky5h2A6/maxcVWEMwCpWnDU=; fh=E6ntj6o+lccwMTJxDQjGAFeqQtltlukuXezmC7FnwhQ=; b=lgV/cFtA5iHJQP5Np+I5CUZyTqDfsCM/Cqo43JFB91VXi1YiVldHK3mLyuAF+uBa1i HFX2bThpYp9qHzSI89CwRnWa3YoUkGg0skPEExvBGTh9BaxKSWQvDvKz95lEE6D2eaJ6 cikTCLj4O/T+KVreK9zFQCH7+xo1/DPfTXMxkcj+IlXLUuq5W4y7EWog3N3LGKccP8sS Lcm7LVJlvAg/4M6QP5efh61OsKCkosB7O2xa5mortfabUIgKUobNuyRgespHc60XHJeh N8dLQi/tfQLjis80jJQ9aAWjBD+2LWpHB+j8ubwHQhjRC9OMtoWpdrt/sJrapkhAD3DH EVtw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GDcB4PpD; 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-kernel+bounces-57832-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57832-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCVUrB9ZWl2JzYZUXI3EyWHOwJbOTdgaxEfZHmDu2NtwTTdezPbfWSlGHg5+ot6RpF/AzV1g9lqRV/WuDOPN+rydY/tANw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y4-20020a05622a004400b0042c3be69e97si2991956qtw.151.2024.02.08.02.18.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 02:18:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57832-ouuuleilei=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=GDcB4PpD; 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-kernel+bounces-57832-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57832-ouuuleilei=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 790031C262D6 for ; Thu, 8 Feb 2024 10:18:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BAA76EB5A; Thu, 8 Feb 2024 10:17:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GDcB4PpD" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 7B6016DD1C for ; Thu, 8 Feb 2024 10:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707387458; cv=none; b=TnAli3k0mio7H/YiolHZyx7i49Hk0tkzvD1SOB3kJFOWdYdCXxeJj4KL+h2tSN9aFYvt3CkPR7Uwq0nsv3/boq0tfk6lnFhkIQr6lnWX+rmK/sXvMKmTAB3aTSoBBsn9DIhfDmygZ2SUe3BV4pJ8G/CoqFOmR2QWw+/Bb2UH2HY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707387458; c=relaxed/simple; bh=TqMu84p62go2ECAjuTKX5lC7+9a4OPfiRFRt5ZFApA8=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=D3F18oehmpUqtJjIpqqgIk2Ynn/t+h/m6oXSpdJndr4CP+JkKG54DoMrO+w7CEHzNs0QipmUQIq7YGAEJj1Z4fe/ycBwXsGhdQxooBPrkD/fzCNcjlTAZKsv03E8+4nCG3+fSvjYg6GXSWkArLRVPJUaBf423p/5/Zsb+tu3BGY= 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=GDcB4PpD; arc=none smtp.client-ip=209.85.208.43 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-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5601eb97b29so1401018a12.0 for ; Thu, 08 Feb 2024 02:17:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707387454; x=1707992254; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mExta14h3FfRuo79nR/+ky5h2A6/maxcVWEMwCpWnDU=; b=GDcB4PpDjORSHT4pBwsomRTCG42odWQd08Y/VyEK0SryNql9mvXetDAqztU95XtA6Z w5FrTrzj/KL1uNPOm5yX6tSZx2K2ePAQEPDEZWYRuzwbo0LVkpw/esW1wIEaVXRWZ5ny r90EAEEaSyWP7yd3Imspbgand6IMjxjqhUcozV5SQ92F8NXRlbmRh1uV2FDG5Wo1YOoH p3vYB4IUzxVnq4/U0Cw3jEGdFbpsVsPWd9S9O3hww5TWnhNyJTcz5DPDVmnS4KguaZJ/ EdUJpgcxJpUFpYafLPLYxRa+65T7e+QujNaoHV8MclshhnPBQ3NQAbzJjXPEMN4ffWV4 DjDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707387454; x=1707992254; h=in-reply-to: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=mExta14h3FfRuo79nR/+ky5h2A6/maxcVWEMwCpWnDU=; b=I59ArLqjLPVYaoMrzpXQhDVMMSK4Iwz0CUmwwZgagOSr7tc0op7FYZVJhsECrH6pk6 P1vaGkjLgf3oKORFx38++EHurzPw3sbnhVHGcJbC9V6Xtph+QJyCQ671HOxpiqhfJ7Rp tYUT1ufQA4/C6A70CmEZ5XBxxbjWzmwOMGAB9SI3iAVhf5fFipb9VIlRtG1WzmsZAy1j W+Df1U5TRNJaLcYauoI9Xfp3IIml0ff0DeacxyXKSY6jMe0rZmn2NbLWI2lbxeXddP/i nPu8O9kyRQIbKoV9YxnDJD1RchTe0DjvD2TGNwXHQfM+yipm7KRZtrU5cGniB9bO+WkG SFiQ== X-Forwarded-Encrypted: i=1; AJvYcCWo08eGxc6NgZhUUcF+ch3Aoiu3Zi+XGo0pP1DwfXc4YR/BUieIL9TbCoUDqlt6nXrOb/mjK7UGEVUJ8bCUMXM0WyP8EFyL5+h/loWu X-Gm-Message-State: AOJu0YzQe+CD9J8/axVvQGqIGY0j0OJDdIVjNBV7Dr9FhZ22oL6SEMiF dmlouZ1ipZtP9GjKjsaNbj3elLeYb6SYPIMreZLU5Q56wnAaMFqpscR5XAODpWM= X-Received: by 2002:a50:aa96:0:b0:55f:ccb4:ec84 with SMTP id q22-20020a50aa96000000b0055fccb4ec84mr2314443edc.1.1707387454717; Thu, 08 Feb 2024 02:17:34 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU41TDGHT0O3Zd4pv2l8cH4j6BtQDwfNy5O8SMYC/4cRdl+FDAuYn1N4inXencM9KSIJQRYVCXNvB1oqaHfNcwSE1OoL5Eh3mOfdxHndzcI8lPsXHUg6W5V5t3zFqlJ70J0VKSUHIeeq07rkaxcCtQkfTNRwFkEpJABpKbySvWpyZkDop94PVG6/C2Ok4CpbGoe/v9zQ/Azi5iIJwIMm3Yo0p/CEfAGbt61tucEf4sTwptF0TTNYnwxpq4PWB+eZQkYjyCrKCevHe1xdYM5fEL092N88BiajKxQWJ4AN+wtbu1Bt1ZXuny80ao4XLnCDM+aVKaM4loTW2DdzPTUoJgJMcvihk0a2bDIWzTwvQy2CWUHHHtP+Oi/TofHRN6Hg/5CKWVBCVAZhi+R57MWWav3qbuTncqAVNJUWubjybh0cZYAh7CQr/jN0BHQDSSHxgfWsAIaPruuR1BRdQ== Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id en14-20020a056402528e00b0055fe55441cbsm663142edb.40.2024.02.08.02.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 02:17:34 -0800 (PST) Date: Thu, 8 Feb 2024 13:17:31 +0300 From: Dan Carpenter To: Matt Chen Cc: Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Alon Giladi , Anjaneyulu , Daniel Gabay , Luca Coelho , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] wifi: iwlwifi: uninitialized variable in iwl_acpi_get_ppag_table() Message-ID: <09900c01-6540-4a32-9451-563da0029cb6@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9620bb77-2d7c-4d76-b255-ad824ebf8e35@moroto.mountain> X-Mailer: git-send-email haha only kidding X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790325547465566060 X-GMAIL-MSGID: 1790325547465566060 This is an error path and Smatch complains that "tbl_rev" is uninitialized on this path. All the other functions follow this same patter where they set the error code and goto out_free so that's probably what was intended here as well. Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi") Signed-off-by: Dan Carpenter --- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c index 506279b95442..6806ac1636ca 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c @@ -848,6 +848,9 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt) goto read_table; } + ret = PTR_ERR(wifi_pkg); + goto out_free; + read_table: fwrt->ppag_ver = tbl_rev; flags = &wifi_pkg->package.elements[1];