]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 4 Mar 2025 14:31:19 +0000 (16:31 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 4 Mar 2025 14:47:10 +0000 (16:47 +0200)
The checked type by PTR_ERR() is the same as returned by __acpi_find_gpio().
Hence there is no need to cast, drop it.

Acked-by: Mika Westerberg <westeri@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpiolib-acpi.c

index 1f9fe50bba00585ddf4ae96fa20c241cfbaf853d..f0dd1aa895835e6ff529fcf911fd5d7200ad00dd 100644 (file)
@@ -994,7 +994,7 @@ __acpi_find_gpio(struct fwnode_handle *fwnode, const char *con_id, unsigned int
                        desc = acpi_get_gpiod_from_data(fwnode,
                                                        propname, idx, info);
                if (PTR_ERR(desc) == -EPROBE_DEFER)
-                       return ERR_CAST(desc);
+                       return desc;
 
                if (!IS_ERR(desc))
                        return desc;