From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63E141D0434; Wed, 2 Oct 2024 14:26:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727879168; cv=none; b=lClrVHwrZF7QBF9yHRfxqCUjrxPei0GWDRciDsd9LCaMM54B8EWK1C8AESUEooPhuodCHQDQ8d9x3lUhFp+LkOJHY+uadvmGeDHhcxKtCvs58X647qgw+0OOr4kWw0Br1PrcxKTQALsEEZF2akJyrTn4u6zR2Fsivo0nGaPV5g4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727879168; c=relaxed/simple; bh=9qZQw8+lKCcaR+yz8qTEbPGc/68VyjSh/qfyprrLyRs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=omzrJ0LL1dStPYbJj1K8EASpk86cXYms0AmMX0UwruTOa/Q4K8ipTnJtwd8MInxdbdM0Wh5BzGhGP6wgJEYJQeGMnPZMm+fn8+5jj/rYq7wKgsHX6fKYkchLpwQJrCJxlj/p9F4PeAHY/emtiLK/DJcX71teU+Z6URHImPExuEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Mh31qvgb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Mh31qvgb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E19FEC4CEC2; Wed, 2 Oct 2024 14:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727879168; bh=9qZQw8+lKCcaR+yz8qTEbPGc/68VyjSh/qfyprrLyRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mh31qvgb5EtrFon9DP/OXalIrFBGd1/hhZr6vO7J9hP7FIq1QTPulH4U3AW56FclW 48XXdSIeRZfTGsIQREfmVyd6QnqYllIOlxnQqbzF0NbnR1bCq4+kZLx6lhnFK4Y5T/ 9b36BeCH4IgAvOZGtXRRbL4tBhxy1Khv5Cd7q4Wk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andy Shevchenko , Aleksandr Mishin , Sakari Ailus , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 6.6 005/538] ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe() Date: Wed, 2 Oct 2024 14:54:04 +0200 Message-ID: <20241002125752.193063769@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241002125751.964700919@linuxfoundation.org> References: <20241002125751.964700919@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aleksandr Mishin [ Upstream commit 07442c46abad1d50ac82af5e0f9c5de2732c4592 ] In tps68470_pmic_opregion_probe() pointer 'dev' is compared to NULL which is useless. Fix this issue by removing unneeded check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: e13452ac3790 ("ACPI / PMIC: Add TI PMIC TPS68470 operation region driver") Suggested-by: Andy Shevchenko Signed-off-by: Aleksandr Mishin Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20240730225339.13165-1-amishin@t-argos.ru [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/pmic/tps68470_pmic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/pmic/tps68470_pmic.c b/drivers/acpi/pmic/tps68470_pmic.c index ebd03e4729555..0d1a82eeb4b0b 100644 --- a/drivers/acpi/pmic/tps68470_pmic.c +++ b/drivers/acpi/pmic/tps68470_pmic.c @@ -376,10 +376,8 @@ static int tps68470_pmic_opregion_probe(struct platform_device *pdev) struct tps68470_pmic_opregion *opregion; acpi_status status; - if (!dev || !tps68470_regmap) { - dev_warn(dev, "dev or regmap is NULL\n"); - return -EINVAL; - } + if (!tps68470_regmap) + return dev_err_probe(dev, -EINVAL, "regmap is missing\n"); if (!handle) { dev_warn(dev, "acpi handle is NULL\n"); -- 2.43.0