summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/or51132.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-07 13:45:47 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-07 13:45:47 +0000
commite07e5abc1bfe38913c72ca97cce4d7b7b034cd1d (patch)
tree523252683474aebf5440fd4d828db9a73c9ee40c /linux/drivers/media/dvb/frontends/or51132.c
parent55d0724f5699252e25c050bd9c30cec1c1e53202 (diff)
downloadmediapointer-dvb-s2-e07e5abc1bfe38913c72ca97cce4d7b7b034cd1d.tar.gz
mediapointer-dvb-s2-e07e5abc1bfe38913c72ca97cce4d7b7b034cd1d.tar.bz2
Cleans up error handling on or51xxx_attach
From: Mauro Carvalho Chehab <mchehab@infradead.org> state is already NULL. Reviewed-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/or51132.c')
-rw-r--r--linux/drivers/media/dvb/frontends/or51132.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/or51132.c b/linux/drivers/media/dvb/frontends/or51132.c
index b314a1f2d..1d2d28ce8 100644
--- a/linux/drivers/media/dvb/frontends/or51132.c
+++ b/linux/drivers/media/dvb/frontends/or51132.c
@@ -564,7 +564,7 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config,
/* Allocate memory for the internal state */
state = kmalloc(sizeof(struct or51132_state), GFP_KERNEL);
if (state == NULL)
- goto error;
+ return NULL;
/* Setup the state */
state->config = config;
@@ -576,10 +576,6 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config,
memcpy(&state->frontend.ops, &or51132_ops, sizeof(struct dvb_frontend_ops));
state->frontend.demodulator_priv = state;
return &state->frontend;
-
-error:
- kfree(state);
- return NULL;
}
static struct dvb_frontend_ops or51132_ops = {