> > - ts = kzalloc(sizeof(struct ad7877), GFP_KERNEL);
> > - input_dev = input_allocate_device();
> > - if (!ts || !input_dev) {
> > - err = -ENOMEM;
> > - goto err_free_mem;
> > - }
> > + ts = devm_kzalloc(&spi->dev, sizeof(struct ad7877), GFP_KERNEL);
> > + input_d
On 11/08/2017 03:04 PM, Andi Shyti wrote:
> Use managed allocated resources to simplify error handling during
> probing failure and module exiting.
>
> With this all the goto labels in the probe function together with
> the cleanups in the remove function are unnecessary, therefore
> removed.
>
>
Use managed allocated resources to simplify error handling during
probing failure and module exiting.
With this all the goto labels in the probe function together with
the cleanups in the remove function are unnecessary, therefore
removed.
CC: Michael Hennerich
Signed-off-by: Andi Shyti
---
dr
3 matches
Mail list logo