summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2005-01-11 14:50:33 +0000
committerJohannes Stezenbach <devnull@localhost>2005-01-11 14:50:33 +0000
commit885a080bfe0ff22080f084272242e5eb9ea7ae53 (patch)
treeddba8442522ab543ae7abb57daae69f51a2335f7 /linux/drivers/media
parent4c570d97778047d7c74f605ff49276645e2265a8 (diff)
downloadmediapointer-dvb-s2-885a080bfe0ff22080f084272242e5eb9ea7ae53.tar.gz
mediapointer-dvb-s2-885a080bfe0ff22080f084272242e5eb9ea7ae53.tar.bz2
vfree() checking cleanups
Signed-off-by: Domen Puncer <domen@coderock.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_demux.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c
index 1aab8b0ab..d46ffe578 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c
@@ -814,10 +814,8 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_
}
#ifndef NOBUFS
- if (feed->buffer) {
- vfree(feed->buffer);
- feed->buffer=0;
- }
+ vfree(feed->buffer);
+ feed->buffer=0;
#endif
feed->state = DMX_STATE_FREE;
@@ -1096,10 +1094,8 @@ static int dvbdmx_release_section_feed(struct dmx_demux *demux,
return -EINVAL;
}
#ifndef NOBUFS
- if (dvbdmxfeed->buffer) {
- vfree(dvbdmxfeed->buffer);
- dvbdmxfeed->buffer=0;
- }
+ vfree(dvbdmxfeed->buffer);
+ dvbdmxfeed->buffer=0;
#endif
dvbdmxfeed->state=DMX_STATE_FREE;
@@ -1321,10 +1317,8 @@ int dvb_dmx_release(struct dvb_demux *dvbdemux)
struct dmx_demux *dmx = &dvbdemux->dmx;
dmx_unregister_demux(dmx);
- if (dvbdemux->filter)
- vfree(dvbdemux->filter);
- if (dvbdemux->feed)
- vfree(dvbdemux->feed);
+ vfree(dvbdemux->filter);
+ vfree(dvbdemux->feed);
return 0;
}
EXPORT_SYMBOL(dvb_dmx_release);