From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Subject: Re: [PATCH 1/5] cpufreq: Define cpufreq_set_drv_attr_files() to add per CPU sysfs attributes Date: Thu, 06 Jun 2013 11:16:06 +0200 Message-ID: <20130606111606.38f9a074@amdc308.digital.local> 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=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.samsung.com ([203.254.224.24]:27373 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751818Ab3FFJQP (ORCPT ); Thu, 6 Jun 2013 05:16:15 -0400 In-reply-to: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Viresh Kumar 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 Hi Viresh, > 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!! Ok, no problem :-) -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group