]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
gpiolib: acpi: Use %pe when passing an error pointer to dev_err()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 23 Oct 2025 06:39:58 +0000 (08:39 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 23 Oct 2025 06:40:46 +0000 (08:40 +0200)
One of the coccinelle recipe suggests to use %pe when we deal with
an error pointer. Do it so.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/r/202510231350.calxvXIm-lkp@intel.com/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpiolib-acpi-core.c

index 67c4c38afb86e8b5e8368ff0611dd94a0345941a..d441c1236d8ca14eea6868f47d8eb78975d4ddfa 100644 (file)
@@ -382,8 +382,8 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
        desc = acpi_request_own_gpiod(chip, agpio, 0, "ACPI:Event");
        if (IS_ERR(desc)) {
                dev_err(chip->parent,
-                       "Failed to request GPIO for pin 0x%04X, err %ld\n",
-                       pin, PTR_ERR(desc));
+                       "Failed to request GPIO for pin 0x%04X, err %pe\n",
+                       pin, desc);
                return AE_OK;
        }