From patchwork Wed Sep 2 21:21:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751809 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AE8E109B for ; Wed, 2 Sep 2020 21:25:36 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EDDC820767 for ; Wed, 2 Sep 2020 21:25:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rkzXrYVV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EDDC820767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 635DE1868; Wed, 2 Sep 2020 23:24:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 635DE1868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599081934; bh=Xr9UHzlM1BPboMgl9o4efZ9ZHPAf0cLOT8lPMOE58ik=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rkzXrYVVf2wR/aLFPBBq0R4LijWaPATHcZlhU3uFQAz7aUv452fVfcht7jWhKuUYL IPtsYyYMmV+K/+oaHJqZtRq89xiYKGAqDlaTk34aod8I9hi0jkwf6ZUBD3Bl2fOBwQ hN+6an2ccEYutEcukY/KbTgHBOxNo4SCXzHquOTw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5D34DF802F7; Wed, 2 Sep 2020 23:22:27 +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 3C530F8024A; Wed, 2 Sep 2020 23:22:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E2FBFF80268 for ; Wed, 2 Sep 2020 23:22:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E2FBFF80268 IronPort-SDR: sTaQEAWyuM4hNzTqEEY94woxdq+HDC3Fgv8yOapPqc6YTUdgKCosCRWCWZE7qnS4Fyd4RqYdLS Khc+gFiMKsIA== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482856" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482856" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:01 -0700 IronPort-SDR: DiPg7Y93sLNQv063qqmTFfKD7nSKrs49MTJQvwXTpkqpIfg4PwTNSclw9XQuwTT451vMqG8JBa Ti/6Jw4Ec4SA== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798271" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:00 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 04/18] ALSA: core: timer: remove redundant assignment Date: Wed, 2 Sep 2020 16:21:19 -0500 Message-Id: <20200902212133.30964-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Cppcheck complains about a possible NULL pointer dereference but it actually looks like the NULL assignment is not needed (same loop is used in other parts of the file without it). Signed-off-by: Pierre-Louis Bossart --- sound/core/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/timer.c b/sound/core/timer.c index 6e27d87b18ed..73ad5ba76b27 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -173,7 +173,7 @@ EXPORT_SYMBOL(snd_timer_instance_free); */ static struct snd_timer *snd_timer_find(struct snd_timer_id *tid) { - struct snd_timer *timer = NULL; + struct snd_timer *timer; list_for_each_entry(timer, &snd_timer_list, device_list) { if (timer->tmr_class != tid->dev_class)