Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 241972
b: refs/heads/master
c: 0798800
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent cf60928 commit 9232938
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57f05bfa2e90fe52fa36755f4cb91e6f495f8353
refs/heads/master: 07988007f8dd2827ba1eb39e6e3c5bbb29cfc30b
11 changes: 10 additions & 1 deletion trunk/drivers/media/dvb/frontends/stv090x.c
Original file line number Diff line number Diff line change
Expand Up @@ -4783,7 +4783,13 @@ struct dvb_frontend *stv090x_attach(const struct stv090x_config *config,
} else {
state->internal = kmalloc(sizeof(struct stv090x_internal),
GFP_KERNEL);
if (!state->internal)
goto error;
temp_int = append_internal(state->internal);
if (!temp_int) {
kfree(state->internal);
goto error;
}
state->internal->num_used = 1;
state->internal->mclk = 0;
state->internal->dev_ver = 0;
Expand All @@ -4796,7 +4802,7 @@ struct dvb_frontend *stv090x_attach(const struct stv090x_config *config,

if (stv090x_setup(&state->frontend) < 0) {
dprintk(FE_ERROR, 1, "Error setting up device");
goto error;
goto err_remove;
}
}

Expand All @@ -4811,6 +4817,9 @@ struct dvb_frontend *stv090x_attach(const struct stv090x_config *config,

return &state->frontend;

err_remove:
remove_dev(state->internal);
kfree(state->internal);
error:
kfree(state);
return NULL;
Expand Down

0 comments on commit 9232938

Please sign in to comment.