diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-07-08 02:57:52 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-08 03:23:56 +0200 |
commit | 771e71570ce4da549fe89978de0a29e3299d7fb7 (patch) | |
tree | 2003fa14c8073a30d70ef28c4da40c4fcb1c961f /drivers/media/dvb/ttusb-dec | |
parent | [PATCH] dvb: Twinhan DST: frontend polarization fix (diff) | |
download | linux-771e71570ce4da549fe89978de0a29e3299d7fb7.tar.xz linux-771e71570ce4da549fe89978de0a29e3299d7fb7.zip |
[PATCH] dvb: ttusb-dec: kfree cleanup
The Coverity checker discovered that these two kfree's can never be executed.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/ttusb-dec')
-rw-r--r-- | drivers/media/dvb/ttusb-dec/ttusbdecfe.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c index 1699cc9f6bb0..725af3af5b27 100644 --- a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c +++ b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c @@ -157,7 +157,8 @@ struct dvb_frontend* ttusbdecfe_dvbt_attach(const struct ttusbdecfe_config* conf /* allocate memory for the internal state */ state = (struct ttusbdecfe_state*) kmalloc(sizeof(struct ttusbdecfe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (state == NULL) + return NULL; /* setup the state */ state->config = config; @@ -167,10 +168,6 @@ struct dvb_frontend* ttusbdecfe_dvbt_attach(const struct ttusbdecfe_config* conf state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops ttusbdecfe_dvbs_ops; @@ -181,7 +178,8 @@ struct dvb_frontend* ttusbdecfe_dvbs_attach(const struct ttusbdecfe_config* conf /* allocate memory for the internal state */ state = (struct ttusbdecfe_state*) kmalloc(sizeof(struct ttusbdecfe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (state == NULL) + return NULL; /* setup the state */ state->config = config; @@ -193,10 +191,6 @@ struct dvb_frontend* ttusbdecfe_dvbs_attach(const struct ttusbdecfe_config* conf state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops ttusbdecfe_dvbt_ops = { |