mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 21:40:53 +07:00
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>
This commit is contained in:
parent
4e8a23ea3c
commit
3473e342d7
@ -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 = {
|
||||
|
@ -529,7 +529,7 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config,
|
||||
/* Allocate memory for the internal state */
|
||||
state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
goto error;
|
||||
return NULL;
|
||||
|
||||
/* Setup the state */
|
||||
state->config = config;
|
||||
@ -541,10 +541,6 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config,
|
||||
memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
|
||||
state->frontend.demodulator_priv = state;
|
||||
return &state->frontend;
|
||||
|
||||
error:
|
||||
kfree(state);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct dvb_frontend_ops or51211_ops = {
|
||||
|
Loading…
Reference in New Issue
Block a user