From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [RFC PATCH 02/11] regulator: Fix error check in set_consumer_device_supply Date: Thu, 15 Sep 2011 14:33:37 +0100 Message-ID: <20110915133337.GI7988@opensource.wolfsonmicro.com> References: <1316085727-15023-1-git-send-email-rnayak@ti.com> <1316085727-15023-2-git-send-email-rnayak@ti.com> <1316085727-15023-3-git-send-email-rnayak@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1316085727-15023-3-git-send-email-rnayak@ti.com> Sender: linux-omap-owner@vger.kernel.org To: Rajendra Nayak Cc: grant.likely@secretlab.ca, devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tony@atomide.com, lrg@ti.com, b-cousson@ti.com List-Id: devicetree@vger.kernel.org On Thu, Sep 15, 2011 at 04:51:58PM +0530, Rajendra Nayak wrote: > The parameters to set_consumer_device_supply() can be considered > invalid (and hence it could return -EINVAL) if nether consumer_dev nor > consumer_dev_name are passed, not when *both* are passed. > Signed-off-by: Rajendra Nayak No, passing both is a clear bug on the part of the caller - the two ways of specifying the device are not supposed to be used together.