Re: [PATCH] misc: microchip: pci1xxxx: Fix return value of nvmem callbacks
From: Dan Carpenter
Date: Wed Jun 12 2024 - 03:42:00 EST
On Wed, Jun 12, 2024 at 07:00:30AM +0000, Joy Chakraborty wrote:
> Read/write callbacks registered with nvmem core expect 0 to be returned
> on success and a negative value to be returned on failure.
>
> Currently pci1xxxx_otp_read()/pci1xxxx_otp_write() and
> pci1xxxx_eeprom_read()/pci1xxxx_eeprom_write() return the number of
> bytes read/written on success.
> Fix to return 0 on success.
>
> Fixes: 9ab5465349c0 ("misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX EEPROM via NVMEM sysfs")
> Fixes: 0969001569e4 ("misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX OTP via NVMEM sysfs")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Joy Chakraborty <joychakr@xxxxxxxxxx>
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
regards,
dan carpenter