Re: [PATCH 1/1] regulator: return set_mode is same mode isrequested

From: Mark Brown
Date: Mon May 17 2010 - 11:34:31 EST


On Mon, May 17, 2010 at 08:45:45PM +0530, Sundar R Iyer wrote:

> + /* sanity check */
> + if (!rdev->desc->ops->get_mode) {
> + ret = -EINVAL;
> + goto out;
> + }

This doesn't seem like the right error handling - if the driver has a
set_mode() you'd *expect* it to have a get_mode() but there's no need
for it to be a strict requirement.
--
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/