diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-07 08:45:47 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:05:09 -0500 |
commit | 3473e342d79be938497a31caedd3c4e8d562485f (patch) | |
tree | 54f08dcac638dcd98bfa3efa5fcd727967330cee /drivers/media/dvb/frontends/or51211.c | |
parent | 4e8a23ea3c1333561f8d0f5daee53feee3e85b8a (diff) |
V4L/DVB (7051): Cleans up error handling on or51xxx_attach
state is already NULL.
Reviewed-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/or51211.c')
-rw-r--r-- | drivers/media/dvb/frontends/or51211.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c index f02bd9445955..6a6b0d727c6f 100644 --- a/drivers/media/dvb/frontends/or51211.c +++ b/drivers/media/dvb/frontends/or51211.c | |||
@@ -529,7 +529,7 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config, | |||
529 | /* Allocate memory for the internal state */ | 529 | /* Allocate memory for the internal state */ |
530 | state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL); | 530 | state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL); |
531 | if (state == NULL) | 531 | if (state == NULL) |
532 | goto error; | 532 | return NULL; |
533 | 533 | ||
534 | /* Setup the state */ | 534 | /* Setup the state */ |
535 | state->config = config; | 535 | state->config = config; |
@@ -541,10 +541,6 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config, | |||
541 | memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops)); | 541 | memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops)); |
542 | state->frontend.demodulator_priv = state; | 542 | state->frontend.demodulator_priv = state; |
543 | return &state->frontend; | 543 | return &state->frontend; |
544 | |||
545 | error: | ||
546 | kfree(state); | ||
547 | return NULL; | ||
548 | } | 544 | } |
549 | 545 | ||
550 | static struct dvb_frontend_ops or51211_ops = { | 546 | static struct dvb_frontend_ops or51211_ops = { |