Commit b0091780 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Greg Kroah-Hartman

staging: cx25821: Remove NULL check before kfree

This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e4e1f289
......@@ -244,12 +244,9 @@ void cx25821_stop_upstream_audio(struct cx25821_dev *dev)
dev->_audioframe_count = 0;
dev->_audiofile_status = END_OF_FILE;
if (dev->_irq_audio_queues) {
kfree(dev->_irq_audio_queues);
dev->_irq_audio_queues = NULL;
}
if (dev->_audiofilename != NULL)
kfree(dev->_audiofilename);
}
......
......@@ -234,12 +234,9 @@ void cx25821_stop_upstream_video_ch2(struct cx25821_dev *dev)
dev->_frame_count_ch2 = 0;
dev->_file_status_ch2 = END_OF_FILE;
if (dev->_irq_queues_ch2) {
kfree(dev->_irq_queues_ch2);
dev->_irq_queues_ch2 = NULL;
}
if (dev->_filename_ch2 != NULL)
kfree(dev->_filename_ch2);
tmp = cx_read(VID_CH_MODE_SEL);
......
......@@ -279,12 +279,9 @@ void cx25821_stop_upstream_video_ch1(struct cx25821_dev *dev)
dev->_frame_count = 0;
dev->_file_status = END_OF_FILE;
if (dev->_irq_queues) {
kfree(dev->_irq_queues);
dev->_irq_queues = NULL;
}
if (dev->_filename != NULL)
kfree(dev->_filename);
tmp = cx_read(VID_CH_MODE_SEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment