Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

eeprom: ee1004: Check chip before probing

Like other eeprom drivers, check if the device is really there and
functional before probing.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20250218220959.721698-1-eajames@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Eddie James and committed by
Greg Kroah-Hartman
d9406677 78c0a505

+4
+4
drivers/misc/eeprom/ee1004.c
··· 304 304 I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_READ_BYTE_DATA)) 305 305 return -EPFNOSUPPORT; 306 306 307 + err = i2c_smbus_read_byte(client); 308 + if (err < 0) 309 + return -ENODEV; 310 + 307 311 mutex_lock(&ee1004_bus_lock); 308 312 309 313 err = ee1004_init_bus_data(client);