From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly Date: Thu, 11 Jan 2018 16:31:59 +0200 Message-ID: <87zi5kii00.fsf@intel.com> References: <20180110155941.16109-1-maxime.ripard@free-electrons.com> <1944741.zEkzsdPTSS@avalon> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1944741.zEkzsdPTSS@avalon> Sender: linux-kernel-owner@vger.kernel.org To: Laurent Pinchart , Maxime Ripard Cc: Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Mark Brown List-Id: dri-devel@lists.freedesktop.org On Thu, 11 Jan 2018, Laurent Pinchart wrote: > My preference, however, would be for devm_regulator_get_optional() to return > NULL when no regulator is present. The current implementation returns -ENODEV > in multiple cases, making it impossible to properly discriminate between > having no regulator and not being able to get the regulator due to an error. Just a word of warning, IS_ERR(NULL) is false, and your proposed change would apparently require quite a churn all over the kernel. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center