[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230711072254.43273-1-krzysztof.kozlowski@linaro.org>
Date: Tue, 11 Jul 2023 09:22:54 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Hans de Goede <hdegoede@...hat.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kernel test robot <lkp@...el.com>,
Dan Carpenter <dan.carpenter@...aro.org>
Subject: [PATCH] fix Input: bcm-keypad - Correct dev_err_probe() error
Pass proper PTR_ERR as dev_err_probe() argument.
Fixes: a2c795b696b2 ("Input: bcm-keypad - simplify with dev_err_probe()")
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
Closes: https://lore.kernel.org/r/202306261505.wTjCXRIO-lkp@intel.com/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
---
drivers/input/keyboard/bcm-keypad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c
index 05b09066df84..bcc480ff7c3b 100644
--- a/drivers/input/keyboard/bcm-keypad.c
+++ b/drivers/input/keyboard/bcm-keypad.c
@@ -367,7 +367,7 @@ static int bcm_kp_probe(struct platform_device *pdev)
/* Enable clock */
kp->clk = devm_clk_get_optional(&pdev->dev, "peri_clk");
if (IS_ERR(kp->clk)) {
- return dev_err_probe(&pdev->dev, error, "Failed to get clock\n");
+ return dev_err_probe(&pdev->dev, PTR_ERR(kp->clk), "Failed to get clock\n");
} else if (!kp->clk) {
dev_dbg(&pdev->dev, "No clock specified. Assuming it's enabled\n");
} else {
--
2.34.1
Powered by blists - more mailing lists