Re: [PATCH v6 2/5] MFD: RK808: Add new mfd driver for RK808

From: Doug Anderson
Date: Wed Aug 27 2014 - 11:56:43 EST


Lee,

On Wed, Aug 27, 2014 at 6:39 AM, Lee Jones <lee.jones@xxxxxxxxxx> 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?

It doesn't hurt to still add a check for np == NULL and bail out, though.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/