From patchwork Wed Apr 3 07:47:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10882989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E3E0F1575 for ; Wed, 3 Apr 2019 07:49:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE507285DC for ; Wed, 3 Apr 2019 07:49:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B043D285F2; Wed, 3 Apr 2019 07:49:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0EFAB28986 for ; Wed, 3 Apr 2019 07:49:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D9E8A1643; Wed, 3 Apr 2019 09:48:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D9E8A1643 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554277771; bh=jy8ktaiq6dH6kLga/oK/iOyNmuAK6BT7J9TR/r00NZ4=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=ipvcoAoLyFjPh3ySiHgYWd19PdxD9o286NvJY28nwzjweRtzNkCgjg+2m7rFuAXTS NqJl7M7GpDX1e5xiMHJFXnnr9kf5zG06iXsQkVHsuREJp+2j9qk4lnvHnhE+Rh8Izz wmTESgSwYJGJfzO0N/L10PmDviz52BYQ1y5AFUBM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5925CF8068A; Wed, 3 Apr 2019 09:48:41 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C1FBBF8962D; Wed, 3 Apr 2019 09:48:39 +0200 (CEST) Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E778BF8068A for ; Wed, 3 Apr 2019 09:48:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E778BF8068A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EjSKI9RY" Received: by mail-pl1-x641.google.com with SMTP id t16so5730917plo.0 for ; Wed, 03 Apr 2019 00:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=wIrhdib+AH7V7mv416SXk4Mr89Zd0kNoPOL6hTxLt3Q=; b=EjSKI9RYimvWRM16YkSc6LGvSzO22UKOs2T9S4A67k5/WXdFA988jWsej87Rpeo4fe zaLe/fyZhJpsLtgOyaodeYRv2/HWkv4YPZznsr4jWbmPIM0SigTBmgSUvcQg4GiEWZnL pV0SRXQ8JieuOYuhuAEIfuRaAv17e1Hqv9GFwejXKcub1xEqG/G5BSLZahWZ6enZ1iMB Ms36nG+zTIHIZQ1ApmyboAju1hEiZjq2zoI9U1bYd21A7qTbOAqtd/y1OJpllkF0cVXs GitkKqvIgH2KiV5S1Df0qV6UYKgoTIarAQExoENf48mnLBS+B2iacWm/lHeyQCTdzj2j NOkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wIrhdib+AH7V7mv416SXk4Mr89Zd0kNoPOL6hTxLt3Q=; b=J07Z+i/3gy2CsbvBsABhYpD97H6a/5Ap4qdEkMAkYE1KIxqqxVKffhBE6gdyoQ76Cp /1GUJytC+ysMkpXO5iEzpsVGTYdWqXxy1Vp262WodzXyl9VasJeV21TJ9rQm+dDrfkt2 pNWjmXT3XBPiAcOyIHIOAJ9bW1S+9Ps/DZSYhW7RCdiSD9BBM1ZVk9/V3h++fr85psrW rpQvjYmH5iQx4YQheVOhu9SqlIBoR8/pYx7frxeK8htAqSjiXVRj4hVApshrUazIEhHe DZzyGkczmSP9F3gSOEy068IQDQMAWKv7ED37wX38/yhRzU5c17U89mJsxtqMSxUK13ys 5u3w== X-Gm-Message-State: APjAAAXjN1KrWGBD1lyX5yp4NRWFak0FXb/YopfDXAIdaHuTKEU9qZyi KmSYdck2ZInnz0TlmiXWLG5ixA== X-Google-Smtp-Source: APXvYqx1F7XIOAypUIEBSjcZX7EXGcVjvkPedEXEoSRCRbrNm5ChVaDD1g9KO6GN3FNPX/L7MSulKw== X-Received: by 2002:a17:902:e20e:: with SMTP id ce14mr62067330plb.193.1554277714315; Wed, 03 Apr 2019 00:48:34 -0700 (PDT) Received: from ubuntu.localdomain ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id i31sm30500995pgi.36.2019.04.03.00.48.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Apr 2019 00:48:33 -0700 (PDT) From: Baolin Wang To: broonie@kernel.org, lgirdwood@gmail.com Date: Wed, 3 Apr 2019 00:47:55 -0700 Message-Id: <811e491489b62624942dabd56f277b08784ef0f9.1554276741.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, tiwai@suse.com, dan.carpenter@oracle.com Subject: [alsa-devel] [PATCH] ASoC: sprd: Fix the smatch warning X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove the unnecessary validation of the 'cstream' variable to fix below smatch warning: sprd_platform_compr_drain_notify() warn: variable dereferenced before check 'cstream' (see line 105) Reported-by: Dan Carpenter Signed-off-by: Baolin Wang --- sound/soc/sprd/sprd-pcm-compress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sprd/sprd-pcm-compress.c b/sound/soc/sprd/sprd-pcm-compress.c index dc84257..424e983 100644 --- a/sound/soc/sprd/sprd-pcm-compress.c +++ b/sound/soc/sprd/sprd-pcm-compress.c @@ -107,8 +107,7 @@ static void sprd_platform_compr_drain_notify(void *arg) memset(stream->info_area, 0, sizeof(struct sprd_compr_playinfo)); - if (cstream) - snd_compr_drain_notify(cstream); + snd_compr_drain_notify(cstream); } static void sprd_platform_compr_dma_complete(void *data)