From: Colin Ian King Date: Mon, 29 Jun 2015 16:10:22 +0000 (+0100) Subject: ALSA: Fix uninintialized error return X-Git-Tag: omap-for-v4.2/fixes-rc1^2~59^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0755e74b8f04d17cea09fa342a788025b2b50e2e;p=pandora-kernel.git ALSA: Fix uninintialized error return Static analysis with cppcheck found the following error: [sound/core/init.c:118]: (error) Uninitialized variable: err ..this was introduced by commit 2471b6c80a70e80de69f5ff4c37187c3912e5874 ("ALSA: info: Register proc entries recursively, too") where the call to snd_info_card_register was removed and no longer setting the error return in err. When snd_info_create_card_entry fails to allocate a an entry, the error path exits with garbage in err. Fix is to return -ENOMEM if entry fails to be allocated. Fixes: 2471b6c80a ("ALSA: info: Register proc entries recursively, too") Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed