lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Aug 2014 18:02:51 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Doug Anderson <dianders@...omium.org>
Cc:	Chris Zhong <zyw@...k-chips.com>, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	"broonie@...nel.org" <broonie@...nel.org>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	Mike Turquette <mturquette@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	rtc-linux@...glegroups.com, Grant Likely <grant.likely@...aro.org>,
	Lin Huang <hl@...k-chips.com>,
	Tao Huang <huangtao@...k-chips.com>,
	Eddie Cai <cf@...k-chips.com>,
	zhangqing <zhangqing@...k-chips.com>, xxx <xxx@...k-chips.com>,
	Heiko Stübner <heiko@...ech.de>,
	Olof Johansson <olof@...om.net>,
	Sonny Rao <sonnyrao@...omium.org>,
	Dmitry Torokhov <dtor@...omium.org>,
	Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
	Kever Yang <kever.yang@...k-chips.com>
Subject: Re: [PATCH v6 2/5] MFD: RK808: Add new mfd driver for RK808

On Wed, 27 Aug 2014, Doug Anderson wrote:
> On Wed, Aug 27, 2014 at 6:39 AM, Lee Jones <lee.jones@...aro.org> wrote:
> >> +static int rk808_probe(struct i2c_client *client,
> >> +                    const struct i2c_device_id *id)
> >> +{
> >> +     int ret;
> >> +     int pm_off = 0;
> >> +     struct rk808 *rk808;
> >> +     struct device_node *np = client->dev.of_node;
> >
> > Are you prepared for np == NULL?
> 
> Given that the driver no longer supports getting its config from
> platform data, I think it simply depends on OF now.  It seems like we
> could add a "&& OF" to the dependencies.  Is that OK with you?

If the driver depends on OF, then it should be specified in the Kconfig.

> It doesn't hurt to still add a check for np == NULL and bail out, though.

If we're depending on OF, then there's no real need to do this.

And of_property_read_bool() does a NULL check on np anyway, so not
checking is still okay.  I was just wondering if not checking was a
mistake or intentional?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ