From: Takashi Iwai Subject: Re: ALSA: emu10k1: Use standard printk helpers Date: Wed, 05 Mar 2014 12:11:23 +0100 Message-ID: References: <20140305110344.GA16926@elgon.mountain> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id BA70E265DF6 for ; Wed, 5 Mar 2014 12:11:23 +0100 (CET) In-Reply-To: <20140305110344.GA16926@elgon.mountain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Dan Carpenter Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 5 Mar 2014 14:05:09 +0300, Dan Carpenter wrote: > > Hello Takashi Iwai, > > The patch 6f002b02166c: "ALSA: emu10k1: Use standard printk helpers" > from Feb 25, 2014, leads to the following static checker warning: > > sound/pci/emu10k1/io.c:75 snd_emu10k1_ptr_write() > error: we previously assumed 'emu' could be null (see line 74) > > sound/pci/emu10k1/io.c > 68 void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data) > 69 { > 70 unsigned int regptr; > 71 unsigned long flags; > 72 unsigned int mask; > 73 > 74 if (!emu) { > ^^^^ > 75 dev_err(emu->card->dev, "ptr_write: emu is null!\n"); > ^^^^^^^^^^^^^^ > Dereference. > > 76 dump_stack(); > 77 return; Damn, this should be simply converted to WARN_ON(). I'll fix it. thanks, Takashi