From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753623AbbICJtJ (ORCPT ); Thu, 3 Sep 2015 05:49:09 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:41920 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753195AbbICJtI (ORCPT ); Thu, 3 Sep 2015 05:49:08 -0400 Message-ID: <1441273746.3191.12.camel@pengutronix.de> Subject: Re: [PATCH] reset: Fix of_reset_control_get() for consistent return values From: Philipp Zabel To: Alban Cc: linux-kernel@vger.kernel.org Date: Thu, 03 Sep 2015 11:49:06 +0200 In-Reply-To: <20150902183506.5e7affdf@avionic-0020> References: <1441121311-31628-1-git-send-email-albeu@free.fr> <1441206592.3279.45.camel@pengutronix.de> <20150902183506.5e7affdf@avionic-0020> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:96de:80ff:fec2:9969 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alban, Am Mittwoch, den 02.09.2015, 18:35 +0200 schrieb Alban: [...] > That's no really the case. If the property doesn't exists, or the > requested index is out of range, of_parse_phandle_with_args() always > return -ENOENT. This is important for optional properties. You are right, I've looked ad __of_parse_phandle_with_args and missed that it's explicitly checked in of_parse_phandle_with_args. I have applied your patch. best regards Philipp