]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
eeprom: at24: fix retrieving the at24_chip_data structure
authorBartosz Golaszewski <brgl@bgdev.pl>
Mon, 7 May 2018 10:08:37 +0000 (12:08 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Wed, 9 May 2018 15:16:06 +0000 (17:16 +0200)
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 <vadimp@mellanox.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/misc/eeprom/at24.c

index 0c125f207aea82c394f989f5033fccda9cd7e0b1..33053b0d1fdf65c2d590598cd361b7869e663522 100644 (file)
@@ -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);