From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module Date: Tue, 09 Sep 2014 10:24:00 -0500 Message-ID: <540F1B90.702@tabi.org> References: <540EFDFF.7050804@tabi.org> <20140909152114.GA2601@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from muin.pair.com (muin.pair.com [209.68.1.55]) by alsa0.perex.cz (Postfix) with ESMTP id 7E0EF2651E3 for ; Tue, 9 Sep 2014 17:24:05 +0200 (CEST) In-Reply-To: <20140909152114.GA2601@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Shengjiu Wang , alsa-devel@alsa-project.org, tiwai@suse.de, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, nicoleotsuka@gmail.com, Li.Xiubo@freescale.com, linuxppc-dev@lists.ozlabs.org List-Id: alsa-devel@alsa-project.org On 09/09/2014 10:21 AM, Mark Brown wrote: >> if (ssi_private->clk) >> > clk_prepare_enable(ssi_private->clk); > Should be a !IS_ERR() - NULL is a valid clock. In that case, ssi_private->clk needs to be initialized to -EINVAL or something, so that the check works on systems that don't have any clocks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from muin.pair.com (muin.pair.com [209.68.1.55]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id B76551A0019 for ; Wed, 10 Sep 2014 01:24:05 +1000 (EST) Message-ID: <540F1B90.702@tabi.org> Date: Tue, 09 Sep 2014 10:24:00 -0500 From: Timur Tabi MIME-Version: 1.0 To: Mark Brown Subject: Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module References: <540EFDFF.7050804@tabi.org> <20140909152114.GA2601@sirena.org.uk> In-Reply-To: <20140909152114.GA2601@sirena.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: Shengjiu Wang , alsa-devel@alsa-project.org, tiwai@suse.de, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, perex@perex.cz, nicoleotsuka@gmail.com, Li.Xiubo@freescale.com, linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 09/09/2014 10:21 AM, Mark Brown wrote: >> if (ssi_private->clk) >> > clk_prepare_enable(ssi_private->clk); > Should be a !IS_ERR() - NULL is a valid clock. In that case, ssi_private->clk needs to be initialized to -EINVAL or something, so that the check works on systems that don't have any clocks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757305AbaIIPYG (ORCPT ); Tue, 9 Sep 2014 11:24:06 -0400 Received: from muin.pair.com ([209.68.1.55]:49505 "EHLO muin.pair.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757278AbaIIPYE (ORCPT ); Tue, 9 Sep 2014 11:24:04 -0400 Message-ID: <540F1B90.702@tabi.org> Date: Tue, 09 Sep 2014 10:24:00 -0500 From: Timur Tabi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Mark Brown CC: Shengjiu Wang , nicoleotsuka@gmail.com, Li.Xiubo@freescale.com, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.de, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module References: <540EFDFF.7050804@tabi.org> <20140909152114.GA2601@sirena.org.uk> In-Reply-To: <20140909152114.GA2601@sirena.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/09/2014 10:21 AM, Mark Brown wrote: >> if (ssi_private->clk) >> > clk_prepare_enable(ssi_private->clk); > Should be a !IS_ERR() - NULL is a valid clock. In that case, ssi_private->clk needs to be initialized to -EINVAL or something, so that the check works on systems that don't have any clocks.