From: Bartosz Golaszewski Date: Mon, 7 May 2018 10:08:37 +0000 (+0200) Subject: eeprom: at24: fix retrieving the at24_chip_data structure X-Git-Tag: v4.17-rc6~18^2~5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76aa3de7095f15af7300012cb29ea8ab93eec348;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 0c125f207aea8..33053b0d1fdf6 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -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);