diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-07-12 11:53:23 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-07-12 11:54:19 -0700 |
commit | 0b64150c34290df5bf962b3b7e45389b0acb03ae (patch) | |
tree | bb0340ebcc710cf21e187dff76c2041a750293cb /drivers/input/keyboard | |
parent | f1efdf7fcef91fdeb2664b5856fdc51a049b8892 (diff) | |
download | linux-0b64150c34290df5bf962b3b7e45389b0acb03ae.tar.gz linux-0b64150c34290df5bf962b3b7e45389b0acb03ae.tar.bz2 linux-0b64150c34290df5bf962b3b7e45389b0acb03ae.zip |
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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202306261505.wTjCXRIO-lkp@intel.com/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230711072449.43569-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/bcm-keypad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c index 0aa6ef0da0ee..f3c3746acd4c 100644 --- a/drivers/input/keyboard/bcm-keypad.c +++ b/drivers/input/keyboard/bcm-keypad.c @@ -359,7 +359,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 { |