summaryrefslogtreecommitdiff
path: root/sound/usb
diff options
context:
space:
mode:
authorkbuild test robot <fengguang.wu@intel.com>2016-09-20 00:10:13 (GMT)
committerTakashi Iwai <tiwai@suse.de>2016-09-20 10:53:23 (GMT)
commita4bc746c41b56ab7588b20d84a58906986edce83 (patch)
tree705e299a2dadc3537ba177dbfdcad6d0f6e7ad13 /sound/usb
parenta16039cbf1a1ee7e76d7d100f9e613998919ab91 (diff)
downloadlinux-a4bc746c41b56ab7588b20d84a58906986edce83.tar.xz
ALSA: line6: fix ifnullfree.cocci warnings
sound/usb/line6/driver.c:484:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Andrej Krutak <dev@andree.sk> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/line6/driver.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c
index f9224ec..c998667 100644
--- a/sound/usb/line6/driver.c
+++ b/sound/usb/line6/driver.c
@@ -480,8 +480,7 @@ static void line6_destruct(struct snd_card *card)
/* Free buffer memory first. We cannot depend on the existence of private
* data from the (podhd) module, it may be gone already during this call
*/
- if (line6->buffer_message)
- kfree(line6->buffer_message);
+ kfree(line6->buffer_message);
kfree(line6->buffer_listen);