public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: eric miao <eric.y.miao@gmail.com>,
	linux-kernel@vger.kernel.org, szabolcs.gyurko@tlt.hu
Subject: Re: [PATCH] make ds1wm driver to check ds1wm_platform_data pointer against NULL
Date: Sat, 10 Nov 2007 20:08:32 +0300	[thread overview]
Message-ID: <20071110170831.GA15564@2ka.mipt.ru> (raw)
In-Reply-To: <20071109170238.628fdf0d.akpm@linux-foundation.org>

On Fri, Nov 09, 2007 at 05:02:38PM -0800, Andrew Morton (akpm@linux-foundation.org) wrote:
> > @@ -351,6 +351,10 @@ static int ds1wm_probe(struct platform_device *pdev)
> >  		goto err0;
> >  	}
> >  	plat = pdev->dev.platform_data;
> > +	if (!plat) {
> > +		ret = -ENXIO;
> > +		goto err0;
> > +	}
> >  	ds1wm_data->bus_shift = plat->bus_shift;
> >  	ds1wm_data->pdev = pdev;
> >  	ds1wm_data->pdata = plat;
> 
> I don't understand this change.  Could you please provide some more details
> regarding what problem it is solving?  How can pdev->dev.platform_data==NULL
> come about?

If I understood correctly, it is posible to call platform's probe
callback without previously calling platform_device_add_data() to setup
platform_data.

But actually I failed to find any user of this platform driver in
vanilla kernel, so it is hard to say if driver is used properly or not
by external modules, and thus this change is very likely valid.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2007-11-10 17:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09  6:07 [PATCH] make ds1wm driver to check ds1wm_platform_data pointer against NULL eric miao
2007-11-10  1:02 ` Andrew Morton
2007-11-10 17:08   ` Evgeniy Polyakov [this message]
2007-11-11  2:26     ` eric miao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071110170831.GA15564@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=akpm@linux-foundation.org \
    --cc=eric.y.miao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=szabolcs.gyurko@tlt.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox