[alsa-devel] ASoC: hdac_hdmi: Add jack reporting

Dan Carpenter dan.carpenter at oracle.com
Wed Feb 17 09:32:23 CET 2016


Hello Jeeja KP,

This is a semi-automatic email about new static checker warnings.

The patch 4a3478debf36: "ASoC: hdac_hdmi: Add jack reporting" from 
Feb 12, 2016, leads to the following Smatch complaint:

sound/soc/codecs/hdac_hdmi.c:971 hdac_hdmi_present_sense()
	 warn: variable dereferenced before check 'edev' (see line 967)

sound/soc/codecs/hdac_hdmi.c
   966		struct hdac_ext_device *edev = pin->edev;
   967		struct hdac_hdmi_priv *hdmi = edev->private_data;
                                              ^^^^^^^^^^^^^^^^^^
Patch introduces a new dereference.

   968		struct hdac_hdmi_pcm *pcm;
   969		int val;
   970	
   971		if (!edev)
                    ^^^^^
Existing code assumed that edev could be NULL.

   972			return;
   973	

regards,
dan carpenter


More information about the Alsa-devel mailing list