Skip to content

Commit e646f0d

Browse files
committed
gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio()
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>
1 parent 2014c95 commit e646f0d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpio/gpiolib-acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ __acpi_find_gpio(struct fwnode_handle *fwnode, const char *con_id, unsigned int
994994
desc = acpi_get_gpiod_from_data(fwnode,
995995
propname, idx, info);
996996
if (PTR_ERR(desc) == -EPROBE_DEFER)
997-
return ERR_CAST(desc);
997+
return desc;
998998

999999
if (!IS_ERR(desc))
10001000
return desc;

0 commit comments

Comments
 (0)