gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio()
PATCH 1/1 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.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/gpio/gpiolib-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib-acpi.c +1 -1
@@ -993,7 +993,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;
Signature · 1 line
2.47.2
Quoted 4 lines · Andy Shevchenko
The checked type by
PTR_ERR()is the same as returned by__acpi_find_gpio(). Hence there is no need to cast, drop it.Signed-off-by Andy Shevchenko <[email protected]>
Acked-by Mika Westerberg <[email protected]>
Quoted 7 lines · Mika Westerberg
Quoted 4 lines · Andy Shevchenko
The checked type by
PTR_ERR()is the same as returned by__acpi_find_gpio(). Hence there is no need to cast, drop it.Signed-off-by Andy Shevchenko <[email protected]>Acked-by Mika Westerberg <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko