From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH 1/5] cpufreq: Define cpufreq_set_drv_attr_files() to add per CPU sysfs attributes Date: Thu, 6 Jun 2013 14:30:39 +0530 Message-ID: References: <1370502472-7249-1-git-send-email-l.majewski@samsung.com> <1370502472-7249-2-git-send-email-l.majewski@samsung.com> <20130606105814.3495e3a9@amdc308.digital.local> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: <20130606105814.3495e3a9@amdc308.digital.local> Sender: cpufreq-owner@vger.kernel.org To: Lukasz Majewski Cc: "Rafael J. Wysocky" , "cpufreq@vger.kernel.org" , Linux PM list , Vincent Guittot , Jonghwa Lee , Myungjoo Ham , linux-kernel , Lukasz Majewski , Andre Przywara , Daniel Lezcano , Lists linaro-kernel List-Id: linux-pm@vger.kernel.org On 6 June 2013 14:28, Lukasz Majewski wrote: > I'm confused here. > > So you want to check dev_attr for NULL just after: > drv_attr = cpufreq_driver->attr; > if (!drv_attr) > goto error; > > and skip the check at the while loop: > while ((drv_attr) && (*drv_attr)) > > to > > while ((*drv_attr)) > > Am I correct? Bingo!!