Re: [PATCH] iio: adc: ti-ads1015: fix incorrect referencing of ads1015_data pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 29, 2016 at 1:40 AM, Matt Ranostay <mranostay@xxxxxxxxx> wrote:
> Reported-by: Giorgio <giorgio.nicole@xxxxxxxx>
> Cc: Daniel Baluta <daniel.baluta@xxxxxxxxx>
> Signed-off-by: Matt Ranostay <mranostay@xxxxxxxxx>
> ---
>  drivers/iio/adc/ti-ads1015.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
> index 73cbf0b54e54..fe96af6059d5 100644
> --- a/drivers/iio/adc/ti-ads1015.c
> +++ b/drivers/iio/adc/ti-ads1015.c
> @@ -403,7 +403,8 @@ static const struct iio_info ads1015_info = {
>  #ifdef CONFIG_OF
>  static int ads1015_get_channels_config_of(struct i2c_client *client)
>  {
> -       struct ads1015_data *data = i2c_get_clientdata(client);
> +       struct iio_dev *indio_dev = i2c_get_clientdata(client);
> +       struct ads1015_data *data = iio_priv(indio_dev);
>         struct device_node *node;
>
>         if (!client->dev.of_node ||
> --

Hi Matt,

Giorgio already sent a patch for this. I think we should go on his way
since he found the bug.

Daniel.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux