Skip to content

Commit c7a5378

Browse files
RengarajanSSgregkh
authored andcommitted
misc: microchip: pci1xxxx: Resolve return code mismatch during GPIO set 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 <[email protected]> Signed-off-by: Rengarajan S <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 194f9f9 commit c7a5378

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int pci1xxxx_gpio_set_config(struct gpio_chip *gpio, unsigned int offset,
148148
pci1xxx_assign_bit(priv->reg_base, OPENDRAIN_OFFSET(offset), (offset % 32), true);
149149
break;
150150
default:
151-
ret = -EOPNOTSUPP;
151+
ret = -ENOTSUPP;
152152
break;
153153
}
154154
spin_unlock_irqrestore(&priv->lock, flags);

0 commit comments

Comments
 (0)