From: Masahiro Yamada Date: Thu, 22 Jan 2015 16:45:15 +0900 Subject: [U-Boot] [PATCH v2 07/26] dm: core: Allow parents to have platform data for their children In-Reply-To: <1421723575-4532-8-git-send-email-sjg@chromium.org> References: <1421723575-4532-1-git-send-email-sjg@chromium.org> <1421723575-4532-8-git-send-email-sjg@chromium.org> Message-ID: <20150122164515.B4DB.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Mon, 19 Jan 2015 20:12:36 -0700 Simon Glass wrote: > diff --git a/drivers/core/device.c b/drivers/core/device.c > index 23ee771..0682e2e 100644 > --- a/drivers/core/device.c > +++ b/drivers/core/device.c > @@ -80,6 +80,18 @@ int device_bind(struct udevice *parent, struct driver *drv, const char *name, > goto fail_alloc1; > } > } > + if (parent && !dev->parent_platdata) { Why should we check whether dev->parent_platdata is NULL? I think it is always NULL here because "dev" is just calloc'ed above. Best Regards Masahiro Yamada