Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932316Ab3FFJAm (ORCPT ); Thu, 6 Jun 2013 05:00:42 -0400 Received: from mail-oa0-f43.google.com ([209.85.219.43]:48313 "EHLO mail-oa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751818Ab3FFJAk (ORCPT ); Thu, 6 Jun 2013 05:00:40 -0400 MIME-Version: 1.0 In-Reply-To: <20130606105814.3495e3a9@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> Date: Thu, 6 Jun 2013 14:30:39 +0530 Message-ID: Subject: Re: [PATCH 1/5] cpufreq: Define cpufreq_set_drv_attr_files() to add per CPU sysfs attributes From: Viresh Kumar 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 Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 601 Lines: 23 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!! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/