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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0F13C43217 for ; Mon, 14 Nov 2022 08:55:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236362AbiKNIzM (ORCPT ); Mon, 14 Nov 2022 03:55:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235456AbiKNIyw (ORCPT ); Mon, 14 Nov 2022 03:54:52 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 349531C401 for ; Mon, 14 Nov 2022 00:54:52 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E860622874; Mon, 14 Nov 2022 08:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668416090; 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=2kpCoTStDLbC0mDpL36oNJqRAWBqkoojNVraAyspOWw=; b=J+87jFaZ7xCpG3IxH9cRl+30Ilvlt1Af69iuLmO0AQG8bwdgDcHCeDog+BQ6qAuwTwMrz/ KTDa4QilSwTlygiH0PeTcvhRIwVvMx/0zO8yNWrRbaapdlxA0C3/IouqpYFzeYjHiFX5vK 19fJKUeVk7qeYY7Ka5poQdIomQCOVmw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668416090; 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=2kpCoTStDLbC0mDpL36oNJqRAWBqkoojNVraAyspOWw=; b=fD80/1FtpAS7P8XmNfXh4Jryy6XUJR53Iu+SPwvjaUoTQ9zgiL1H2jHajKPta3DCcf2Yyl no6iQbUeqkCyO5Cw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A17D813A8C; Mon, 14 Nov 2022 08:54:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FZJFJloCcmMkLwAAMHmgww (envelope-from ); Mon, 14 Nov 2022 08:54:50 +0000 Date: Mon, 14 Nov 2022 09:54:50 +0100 Message-ID: <87o7t9531h.wl-tiwai@suse.de> From: Takashi Iwai To: Daniil Tatianin Cc: Jaroslav Kysela , Takashi Iwai , Tim Crawford , Stefan Binding , Kai-Heng Feng , Meng Tang , Lucas Tanure , Philipp Jungkamp , Werner Sembach , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, yc-core@yandex-team.ru Subject: Re: [PATCH v1] sound/pci/hda/patch_realtek: don't call alc_shutup_pins without a spec In-Reply-To: References: <20221114082048.3477027-1-d-tatianin@yandex-team.ru> <87r0y63psf.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Nov 2022 09:35:10 +0100, Daniil Tatianin wrote: > > > > On 11/14/22 11:26 AM, Takashi Iwai wrote: > > On Mon, 14 Nov 2022 09:20:48 +0100, > > Daniil Tatianin wrote: > >> > >> alc_shutup_pins always expects the spec to be present, so make sure > >> it is before we call it. > >> > >> Found by Linux Verification Center (linuxtesting.org) with the SVACE > >> static analysis tool. > >> > >> Signed-off-by: Daniil Tatianin > > > > In which path can it be without spec assigned? > > That's the internal callback that is set only by the codec driver > > where the allocation of codec->spec is mandatory. > > Would you then say that the "if (spec && ...)" that was there before > was redundant? Yes. Takashi