From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765701AbdAKQ0r (ORCPT ); Wed, 11 Jan 2017 11:26:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:40948 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752650AbdAKQ0q (ORCPT ); Wed, 11 Jan 2017 11:26:46 -0500 Date: Wed, 11 Jan 2017 17:26:42 +0100 Message-ID: From: Takashi Iwai To: "Arnd Bergmann" Cc: "Jaroslav Kysela" , , Subject: Re: [PATCH] ALSA: hda/ca0132 - fix possible NULL pointer use In-Reply-To: <20170111134013.3798733-1-arnd@arndb.de> References: <20170111134013.3798733-1-arnd@arndb.de> 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.1 (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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Jan 2017 14:39:44 +0100, Arnd Bergmann wrote: > > gcc-7 caught what it considers a NULL pointer dereference: > > sound/pci/hda/patch_ca0132.c: In function 'dspio_scp.constprop': > sound/pci/hda/patch_ca0132.c:1487:4: error: argument 1 null where non-null expected [-Werror=nonnull] > > This is plausible from looking at the function, as we compare 'reply' > to NULL earlier in it. I have not tried to analyze if there are constraints > that make it impossible to hit the bug, but adding another NULL check in > the end kills the warning and makes the function more robust. > > Signed-off-by: Arnd Bergmann Applied, thanks. Takashi