Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934415AbeAKO1X (ORCPT + 1 other); Thu, 11 Jan 2018 09:27:23 -0500 Received: from mga03.intel.com ([134.134.136.65]:53904 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933378AbeAKO1W (ORCPT ); Thu, 11 Jan 2018 09:27:22 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,344,1511856000"; d="scan'208";a="20798488" From: Jani Nikula To: Laurent Pinchart , Maxime Ripard Cc: Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Mark Brown Subject: Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly In-Reply-To: <1944741.zEkzsdPTSS@avalon> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20180110155941.16109-1-maxime.ripard@free-electrons.com> <1944741.zEkzsdPTSS@avalon> Date: Thu, 11 Jan 2018 16:31:59 +0200 Message-ID: <87zi5kii00.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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