diff options
Diffstat (limited to 'drivers/media/dvb-frontends/as102_fe.c')
-rw-r--r-- | drivers/media/dvb-frontends/as102_fe.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/dvb-frontends/as102_fe.c b/drivers/media/dvb-frontends/as102_fe.c index 98d575f2744c..b1c84ee914f0 100644 --- a/drivers/media/dvb-frontends/as102_fe.c +++ b/drivers/media/dvb-frontends/as102_fe.c @@ -455,11 +455,10 @@ struct dvb_frontend *as102_attach(const char *name, struct as102_state *state; struct dvb_frontend *fe; - state = kzalloc(sizeof(struct as102_state), GFP_KERNEL); - if (state == NULL) { - pr_err("%s: unable to allocate memory for state\n", __func__); + state = kzalloc(sizeof(*state), GFP_KERNEL); + if (!state) return NULL; - } + fe = &state->frontend; fe->demodulator_priv = state; state->ops = ops; |