Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1857557ybn; Thu, 26 Sep 2019 03:18:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy57hV0j0vkYNTXYp6zgvlsDrOwGuDwG0MAiG8nsw87O2KrL1aZsmMonKgqAD9zQeBGpIWi X-Received: by 2002:aa7:d750:: with SMTP id a16mr2632789eds.27.1569493084358; Thu, 26 Sep 2019 03:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569493084; cv=none; d=google.com; s=arc-20160816; b=Bf27O9V8awbAcWLYcmSl2atZQaikHnP6/ZgORLUoOVyGQ4AI+R3xHdhm2VfpomkgFW n+gbVxeaD/VwG1tM9D/p+wkPs7kukq3JxcWqZY8uOMsfnrKrf7iMqR7BZEsmwkVhy4aT 3FbDESN1N4r23DtvHJzJ+MxaA43MXRqC/22evOfkP/RCazacu7j5ZQUimoNS/828Ax7f 5/7VFTY4zHcsh71/KqXFdgzvIOIR5kdXSJcAKqI/eqtK3Q/b5TCJfLSFXrpiArRYVWGt r48KRZb3M3QlY2chj3NtRCpXXQ8geKCEteqef4jSoZwapXxFdEv99Bj98nE5RsxasHVp zXUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uI3653QvRfDun5vRH9qyIawnNKEumCLQmRxicnF+xIE=; b=ayYCnnvkbegm48kWXp5LOZUelZCuPhAcxzyxsbAqWwlRIjiu8GtkIvGSPRSaPzp4rG T39GMH8EGTXkaoeM7ECayb1qA16Z39YYwT+JA3sdypypKrLYYnVGOGC2GrLLEJF4HvtM MtXGVBElKVLb1YzyNCzt7CZHxMGiDnkaG/lP8+F7GK3hcNW9GlHGJ0ZUycHvVrQvjcEm 4zCaKsCZOQzoyy1ojeTJJzg/mzlkEPdsWzyEK9zmRhWLQ+u+mEqgsXpHpAaTn9wobAmv yqB3+AJ/kQ+f3yi3geDFTwQWznIhpByNpjKg3ERBn7Vm6gpkyccSA9QDmJf2z2Jy3VGK NVdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BmhqPRhl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si739975ejk.301.2019.09.26.03.17.41; Thu, 26 Sep 2019 03:18:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BmhqPRhl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391458AbfIZBty (ORCPT + 99 others); Wed, 25 Sep 2019 21:49:54 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33113 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388759AbfIZBty (ORCPT ); Wed, 25 Sep 2019 21:49:54 -0400 Received: by mail-pf1-f193.google.com with SMTP id q10so768212pfl.0; Wed, 25 Sep 2019 18:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uI3653QvRfDun5vRH9qyIawnNKEumCLQmRxicnF+xIE=; b=BmhqPRhlQgpby6NkH48NMswsV+CwXScc+2OJ4w/Kc48zNgHHAfS2FqHNPwzS+O0xB6 6ocLda3/dxNOPh9j3Rv4CSYsH+9gMHSJKJblwGho55ICTrYxOb6AdPD8tdBI3DtrleLI i7Fcl/1yXHmmVQeNqf39ZNrySFVSen2JoClH6PQhbsFZWrxgPm9Gj4TxA+Vp7L7RnLTd Ogwiv5cMP6Lvy6MjRCbnuVAQkAw9iHmCnOiLSbdgQ/ybBe85RQkDQ63NhNgHiQ621/Zc DsHnR7LUv8gvc57oGKi1HAnqVnRM1qfPt0kZJFNzgXDQw+rWN+BfxVItLiGg/ED/h0c+ tx+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uI3653QvRfDun5vRH9qyIawnNKEumCLQmRxicnF+xIE=; b=TOTuX6qAFBGiAjFi18M6MSRwPW2BDZpvmAJn6k+oRUWpTclbJxXRz3Uec9wI33nAx3 5wQq051aaOj54lgGqqu7AL3KN0AH/X/8DmyOGuB42FoCWE+0em0pDDBZS3Zzni+diXOg PCMC4bQpL7Qa3WmtuY1qm8vex88MwtoolmbNx/UYD1f7e13nqKaTbBdK+/qNqR37fprJ aenbcAeoA3ZvlqQrYYiFbg3aYiTw9DHc+2JWCKoQkYkMG1uhhRwPOuFJrCarxC2NnRsk QDMd+Ugtx97GUUsscfuyGYOnBZZKMUx7P9N9H87c/iTNnA57yvk3oAN6Y/uREPEuCgxj 0O4g== X-Gm-Message-State: APjAAAUX+CJBZH+YGZf3iPyi2q/Sh7xg7V5NbN4Iq6s80UBxNgMZBVYH cEIykvAT2AGaRuB4Yti9OQ8= X-Received: by 2002:a17:90a:1b46:: with SMTP id q64mr817457pjq.76.1569462593023; Wed, 25 Sep 2019 18:49:53 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id d14sm324463pfh.36.2019.09.25.18.49.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Sep 2019 18:49:52 -0700 (PDT) Date: Wed, 25 Sep 2019 18:49:06 -0700 From: Nicolin Chen To: Shengjiu Wang Cc: timur@kernel.org, Xiubo.Lee@gmail.com, festevam@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, lars@metafoo.de Subject: Re: [PATCH V5 4/4] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8 Message-ID: <20190926014905.GA24545@Asurada-Nvidia.nvidia.com> References: <7c05d8396fd8c4f9d41c13a85e7486f3664bc73f.1569387932.git.shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c05d8396fd8c4f9d41c13a85e7486f3664bc73f.1569387932.git.shengjiu.wang@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just a small concern... On Thu, Sep 26, 2019 at 09:29:51AM +0800, Shengjiu Wang wrote: > static int fsl_asrc_dma_startup(struct snd_pcm_substream *substream) > { > + > + release_pair = false; > + ret = snd_soc_set_runtime_hwparams(substream, &snd_imx_hardware); This set_runtime_hwparams() always returns 0 for now, but if one day it changes and it fails here, kfree() will be still ignored although the startup() gets error-out. We could avoid this if we continue to ignore the return value like the current code. Or we may check ret at kfree() also? > + > +out: > + dma_release_channel(tmp_chan); > + > +dma_chan_err: > + fsl_asrc_release_pair(pair); > + > +req_pair_err: > + if (release_pair) > + kfree(pair); > + > + return ret; > }