eeprom: at24: fix retrieving the at24_chip_data structure
Subsystems (2)
PATCH 1/1 eeprom: at24: fix retrieving the at24_chip_data structure
Commit feb2f19b1e8f ("eeprom: at24: move platform data processing into a separate routine") introduced a bug where we incorrectly retireve the at24_chip_data structure. Remove the unnecessary ampersand operator.
Fixes feb2f19b1e8f ("eeprom: at24: move platform data processing into a separate routine")
Reported-by Vadim Pasternak <[email protected]>
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/misc/eeprom/at24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/eeprom/at24.c +1 -1
@@ -518,7 +518,7 @@ static int at24_get_pdata(struct device *dev, struct at24_platform_data *pdata)if (of_node &&of_match_device (at24_of_match, dev)) cdata =of_device_get_match_data (dev);else if (id) - cdata = (void *)&id->driver_data; + cdata = (void *)id->driver_data;else cdata =acpi_device_get_match_data (dev);
Signature · 1 line
2.17.0
2018-05-07 12:16 GMT+02:00 Bartosz Golaszewski <[email protected]>:
Quoted 25 lines
Commit
feb2f19b1e8f("eeprom: at24: move platform data processing into a separate routine") introduced a bug where we incorrectly retireve theat24_chip_datastructure. Remove the unnecessary ampersand operator.Fixes feb2f19b1e8f ("eeprom: at24: move platform data processing into a separate routine")Reported-by Vadim Pasternak <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/misc/eeprom/at24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/eeprom/at24.c +1
-2@@ -518,7 +518,7 @@ static int at24_get_pdata(struct device *dev, struct at24_platform_data *pdata)if (of_node &&of_match_device (at24_of_match, dev)) cdata =of_device_get_match_data (dev);else if (id) - cdata = (void *)&id->driver_data; + cdata = (void *)id->driver_data;else cdata =acpi_device_get_match_data (dev); --
Quoted 2 lines
2.17.0
Patch applied to at24/for-current.