From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754548AbdDLPew (ORCPT ); Wed, 12 Apr 2017 11:34:52 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35977 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753947AbdDLPet (ORCPT ); Wed, 12 Apr 2017 11:34:49 -0400 Date: Thu, 13 Apr 2017 15:31:38 +0800 From: Dong Aisheng To: Mark Brown Cc: Dong Aisheng , linux-kernel@vger.kernel.org, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, lgirdwood@gmail.com, yibin.gong@nxp.com Subject: Re: [PATCH 5/6] regulator: anatop-regulator: make regulator-name using optionally Message-ID: <20170413073138.GB23163@b29396-OptiPlex-7040> References: <1491962327-12477-1-git-send-email-aisheng.dong@nxp.com> <1491962327-12477-5-git-send-email-aisheng.dong@nxp.com> <20170411203817.5f32em4v5xiwzchl@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170411203817.5f32em4v5xiwzchl@sirena.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 11, 2017 at 09:38:18PM +0100, Mark Brown wrote: > On Wed, Apr 12, 2017 at 09:58:46AM +0800, Dong Aisheng wrote: > > rdesc->name/regulator-name is optional according to standard regulator > > binding doc. Use it conditionally to avoid a kernel NULL point crash. > > It is optional in the standard binding because it is used to override > the name statically provided in the driver for the device. Since the > anatop regulator is completely dynamic (there's no static list of > regulators in the device) it's mandatory for anatop regulators - you > should improve the error handling instead to detect a missing name. Got it. Will change in v2. Thanks for the suggestion. Regards Dong Aisheng