All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eeprom: at24: fix retrieving the at24_chip_data structure
@ 2018-05-07 10:16 Bartosz Golaszewski
  2018-05-09 15:16 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2018-05-07 10:16 UTC (permalink / raw)
  To: Vadim Pasternak, Andy Shevchenko
  Cc: linux-i2c, linux-kernel, Bartosz Golaszewski

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 0c125f207aea..33053b0d1fdf 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);
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] eeprom: at24: fix retrieving the at24_chip_data structure
  2018-05-07 10:16 [PATCH] eeprom: at24: fix retrieving the at24_chip_data structure Bartosz Golaszewski
@ 2018-05-09 15:16 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2018-05-09 15:16 UTC (permalink / raw)
  To: Vadim Pasternak, Andy Shevchenko
  Cc: linux-i2c, Linux Kernel Mailing List, Bartosz Golaszewski

2018-05-07 12:16 GMT+02:00 Bartosz Golaszewski <brgl@bgdev.pl>:
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index 0c125f207aea..33053b0d1fdf 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);
>
> --
> 2.17.0
>

Patch applied to at24/for-current.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-09 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 10:16 [PATCH] eeprom: at24: fix retrieving the at24_chip_data structure Bartosz Golaszewski
2018-05-09 15:16 ` Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.