From 885a080bfe0ff22080f084272242e5eb9ea7ae53 Mon Sep 17 00:00:00 2001 From: Johannes Stezenbach Date: Tue, 11 Jan 2005 14:50:33 +0000 Subject: vfree() checking cleanups Signed-off-by: Domen Puncer --- linux/drivers/media/dvb/dvb-core/dvb_demux.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'linux/drivers/media') 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); -- cgit v1.2.3