aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/frontends/or51132.c6
-rw-r--r--drivers/media/dvb/frontends/or51211.c6
2 files changed, 2 insertions, 10 deletions
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c
index b314a1f2deed..1d2d28ce823d 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -564,7 +564,7 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config,
564 /* Allocate memory for the internal state */ 564 /* Allocate memory for the internal state */
565 state = kmalloc(sizeof(struct or51132_state), GFP_KERNEL); 565 state = kmalloc(sizeof(struct or51132_state), GFP_KERNEL);
566 if (state == NULL) 566 if (state == NULL)
567 goto error; 567 return NULL;
568 568
569 /* Setup the state */ 569 /* Setup the state */
570 state->config = config; 570 state->config = config;
@@ -576,10 +576,6 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config,
576 memcpy(&state->frontend.ops, &or51132_ops, sizeof(struct dvb_frontend_ops)); 576 memcpy(&state->frontend.ops, &or51132_ops, sizeof(struct dvb_frontend_ops));
577 state->frontend.demodulator_priv = state; 577 state->frontend.demodulator_priv = state;
578 return &state->frontend; 578 return &state->frontend;
579
580error:
581 kfree(state);
582 return NULL;
583} 579}
584 580
585static struct dvb_frontend_ops or51132_ops = { 581static struct dvb_frontend_ops or51132_ops = {
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
545error:
546 kfree(state);
547 return NULL;
548} 544}
549 545
550static struct dvb_frontend_ops or51211_ops = { 546static struct dvb_frontend_ops or51211_ops = {