[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <457b8ff8-4093-3b82-5358-4b8460a1b012@linux.intel.com>
Date: Thu, 10 Sep 2020 17:53:57 +0800
From: "Tanwar, Rahul" <rahul.tanwar@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Guenter Roeck <linux@...ck-us.net>, jdelvare@...e.com,
p.zabel@...gutronix.de, linux-hwmon@...r.kernel.org,
robh+dt@...nel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, songjun.Wu@...el.com,
cheol.yong.kim@...el.com, qi-ming.wu@...el.com,
rtanwar@...linear.com
Subject: Re: [PATCH 2/2] Add driver for Moortec MR75203 PVT controller
On 10/9/2020 5:46 pm, Andy Shevchenko wrote:
> On Thu, Sep 10, 2020 at 03:27:11PM +0800, Tanwar, Rahul wrote:
>> On 9/9/2020 11:05 pm, Guenter Roeck wrote:
>>> On 9/8/20 11:52 PM, Rahul Tanwar wrote:
> ...
>
>>>> +static int pvt_get_regmap(struct platform_device *pdev, char *reg_name)
>>>> +{
>>>> + struct device *dev = &pdev->dev;
>>>> + struct pvt_device *pvt = platform_get_drvdata(pdev);
>>> I am quite at loss how this is supposed to work. Platform driver
>>> data is not initialized with a pointer to struct pvt_device at this point.
>>> How does this code not crash ? What am I missing ?
>> Big mistake on my part. Last minute change based on internal review feedback
>> about moving platform_set_drvdata() at the end of probe. I will fix it in v2.
>> Thanks.
> Since IIRC it was me who suggested this I should say that reviewer can make
> mistakes, on the other hand contributor should have had known their code to
> refuse certain changes.
>
Totally agree. Overlooked in a hasty change..
Regards,
Rahul
Powered by blists - more mailing lists