search for: err_devm_kfree

Displaying 6 results from an estimated 6 matches for "err_devm_kfree".

2020 Feb 07
1
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...39;t use devm_ here. Noralf. > + if (!encoder) > + return ERR_PTR(-ENOMEM); > + > + if (name) { > + va_list ap; > + > + va_start(ap, name); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) { > + ret = -ENOMEM; > + goto err_devm_kfree; > + } > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_destroy, > + encoder_type, namestr); > + if (ret) > + goto err_kfree; > + > + return encoder; > + > +err_kfree: > + if (name) > + kfree(namestr); > +...
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...sizeof(*encoder), GFP_KERNEL); > + if (!encoder) > + return ERR_PTR(-ENOMEM); > + > + if (name) { > + va_list ap; > + > + va_start(ap, name); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) { > + ret = -ENOMEM; > + goto err_devm_kfree; > + } > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_destroy, > + encoder_type, namestr); > + if (ret) > + goto err_kfree; > + > + return encoder; > + > +err_kfree: > + if (name) > + kfree(namestr); > +...
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...sizeof(*encoder), GFP_KERNEL); > + if (!encoder) > + return ERR_PTR(-ENOMEM); > + > + if (name) { > + va_list ap; > + > + va_start(ap, name); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) { > + ret = -ENOMEM; > + goto err_devm_kfree; > + } > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_destroy, > + encoder_type, namestr); > + if (ret) > + goto err_kfree; > + > + return encoder; > + > +err_kfree: > + if (name) > + kfree(namestr); > +...
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...encoder; + int ret; + + encoder = devm_kzalloc(dev->dev, sizeof(*encoder), GFP_KERNEL); + if (!encoder) + return ERR_PTR(-ENOMEM); + + if (name) { + va_list ap; + + va_start(ap, name); + namestr = kvasprintf(GFP_KERNEL, name, ap); + va_end(ap); + if (!namestr) { + ret = -ENOMEM; + goto err_devm_kfree; + } + } + + ret = __drm_encoder_init(dev, encoder, + &drm_simple_encoder_funcs_destroy, + encoder_type, namestr); + if (ret) + goto err_kfree; + + return encoder; + +err_kfree: + if (name) + kfree(namestr); +err_devm_kfree: + devm_kfree(dev->dev, encoder); + return ERR_PTR(ret);...
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...ncoder) >> + return ERR_PTR(-ENOMEM); >> + >> + if (name) { >> + va_list ap; >> + >> + va_start(ap, name); >> + namestr = kvasprintf(GFP_KERNEL, name, ap); >> + va_end(ap); >> + if (!namestr) { >> + ret = -ENOMEM; >> + goto err_devm_kfree; >> + } >> + } >> + >> + ret = __drm_encoder_init(dev, encoder, >> + &drm_simple_encoder_funcs_destroy, >> + encoder_type, namestr); >> + if (ret) >> + goto err_kfree; >> + >> + return encoder; >> + >> +err_kfree:...
2020 Feb 07
11
[PATCH 0/6] drm: Provide a simple encoder
Many DRM drivers implement an encoder with an empty implementation. This patchset adds drm_simple_encoder_init() and drm_simple_encoder_create(), which can be used by drivers instead. Except for the destroy callback, the simple encoder's implementation is empty. The patchset also converts 4 encoder instances to use the simple-encoder helpers. But there are at least 11 other drivers which can