tree 2003fa14c8073a30d70ef28c4da40c4fcb1c961f
parent 3dff919425dd79954447e6ab39807b4c27ba3089
author Adrian Bunk <[EMAIL PROTECTED]> Fri, 08 Jul 2005 07:57:52 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Fri, 08 Jul 2005 08:23:56 -0700

[PATCH] dvb: ttusb-dec: kfree cleanup

The Coverity checker discovered that these two kfree's can never be executed.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Signed-off-by: Johannes Stezenbach <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 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
--- 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_att
 
        /* 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_att
        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_att
 
        /* 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_att
        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 = {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to