From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EF8EC2B9F2 for ; Sat, 22 May 2021 06:46:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 345B561244 for ; Sat, 22 May 2021 06:46:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbhEVGrh (ORCPT ); Sat, 22 May 2021 02:47:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:42334 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbhEVGrf (ORCPT ); Sat, 22 May 2021 02:47:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1621665970; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FULl3P8JCyjhywEm+0IlA2mLO7qIH/qoOOWGx3cEAxI=; b=0cxQXuvgIphEUCeYdrUSi0+ighlyaQmryPCwseIjl7fEoFHYACODxXUJ45VAqsfjZEM1V6 Zae9zqxXXiQjbmhAoe/XVM/6tLwjqvHTzrcijkmC0bWyyTuYjUrg3TBESuhvHU39PsQFru 9Qr+FC3J9A4tYMy9TXDGt0oZ5pnhscA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1621665970; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FULl3P8JCyjhywEm+0IlA2mLO7qIH/qoOOWGx3cEAxI=; b=pdeqCAi/SrJ99WNcb2cDqasmESDhuwX3wIGtsNA+2Dmig2ORlZg5cbTkwCqe0d9FGHDP49 pjXkaJh+aKz7bbAQ== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 75C55AB6D; Sat, 22 May 2021 06:46:10 +0000 (UTC) Date: Sat, 22 May 2021 08:46:10 +0200 Message-ID: From: Takashi Iwai To: trix@redhat.com Cc: perex@perex.cz, tiwai@suse.com, gustavoars@kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: usb-audio: initialize the cur variable In-Reply-To: <20210521194603.2077623-1-trix@redhat.com> References: <20210521194603.2077623-1-trix@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 May 2021 21:46:03 +0200, trix@redhat.com wrote: > > From: Tom Rix > > Static analysis reports this problem > clock.c:338:10: warning: The right operand of '==' > is a garbage value > if (i == cur) > ^ ~~~ > > In __uac_clock_find_source() the goto find_others skips over > setting of the 'cur' variable. Since the pin loop variable > starts with 1, it is safe to initialize cur to 0. > > Signed-off-by: Tom Rix Thanks for the patch, but this has been already fixed in for-next branch. Takashi