Skip to content

Commit

Permalink
misc: microchip: pci1xxxx: Resolve return code mismatch during GPIO s…
Browse files Browse the repository at this point in the history
…et config

Driver returns -EOPNOTSUPPORTED on unsupported parameters case in set
config. Upper level driver checks for -ENOTSUPP. Because of the return
code mismatch, the ioctls from userspace fail. Resolve the issue by
passing -ENOTSUPP during unsupported case.

Fixes: 7d3e4d8 ("misc: microchip: pci1xxxx: load gpio driver for the gpio controller auxiliary device enumerated by the auxiliary bus driver.")
Cc: stable <stable@kernel.org>
Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
Link: https://lore.kernel.org/r/20241205133626.1483499-3-rengarajan.s@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Rengarajan S authored and Greg Kroah-Hartman committed Jan 8, 2025
1 parent 194f9f9 commit c7a5378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static int pci1xxxx_gpio_set_config(struct gpio_chip *gpio, unsigned int offset,
pci1xxx_assign_bit(priv->reg_base, OPENDRAIN_OFFSET(offset), (offset % 32), true);
break;
default:
ret = -EOPNOTSUPP;
ret = -ENOTSUPP;
break;
}
spin_unlock_irqrestore(&priv->lock, flags);
Expand Down

0 comments on commit c7a5378

Please sign in to comment.