s->ctx_data.tx.cache.tail = 0;
s->ctx_data.tx.cache.descs = kcalloc(s->ctx_data.tx.cache.size,
sizeof(*s->ctx_data.tx.cache.descs), GFP_KERNEL);
- if (!s->ctx_data.tx.cache.descs)
+ if (!s->ctx_data.tx.cache.descs) {
+ err = -ENOMEM;
goto err_context;
+ }
}
} else {
static const struct {
};
s->ctx_data.rx.seq.descs = kcalloc(queue_size, sizeof(*s->ctx_data.rx.seq.descs), GFP_KERNEL);
- if (!s->ctx_data.rx.seq.descs)
+ if (!s->ctx_data.rx.seq.descs) {
+ err = -ENOMEM;
goto err_context;
+ }
s->ctx_data.rx.seq.size = queue_size;
s->ctx_data.rx.seq.tail = 0;
s->ctx_data.rx.seq.head = 0;