From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Larsson Subject: Re: [PATCH 2/6] of: Return -ENXIO from of_parse_phandle_with_args for too large index and return errors from of_gpio_named_count Date: Fri, 28 Dec 2012 12:02:54 +0100 Message-ID: <50DD7C5E.4080007@gaisler.com> References: <1356610247-11491-1-git-send-email-andreas@gaisler.com> <1356610247-11491-3-git-send-email-andreas@gaisler.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1356610247-11491-3-git-send-email-andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Grant Likely Cc: software-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Linus Walleij List-Id: devicetree@vger.kernel.org On 2012-12-27 13:10, Andreas Larsson wrote: > This lets of_gpio_named_count return an errno on errors by being able to > distinguish between reaching the end of the phandle list and getting some other > error from of_parse_phandle_with_args. > > Return error from of_spi_register_master when there is an "cs-gpios" list for > which gp_gpio_named_count fails. > > Adjust drivers/hwmon/gpio-fan.c to cope with error return. > > Signed-off-by: Andreas Larsson The callers of of_gpio_count of course also needs to handle errno returns. I'll take care of that in V2 of the patch-set. But I'll wait for more comments on the patch set before sending V2 unless someone insists. Cheers, Andreas ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812