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: 7d3e4d807df2 ("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>

authored by Rengarajan S and committed by Greg Kroah-Hartman c7a5378a 194f9f94

Changed files
+1 -1
drivers
misc
mchp_pci1xxxx
+1 -1
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
··· 148 148 pci1xxx_assign_bit(priv->reg_base, OPENDRAIN_OFFSET(offset), (offset % 32), true); 149 149 break; 150 150 default: 151 - ret = -EOPNOTSUPP; 151 + ret = -ENOTSUPP; 152 152 break; 153 153 } 154 154 spin_unlock_irqrestore(&priv->lock, flags);