search for: err_kfree

Displaying 20 results from an estimated 34 matches for "err_kfree".

Did you mean: err_free
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...me); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) > + return -ENOMEM; > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_cleanup, > + encoder_type, namestr); > + if (ret) > + goto err_kfree; > + > + return 0; > + > +err_kfree: > + if (name) > + kfree(namestr); > + return ret; > +} > +EXPORT_SYMBOL(drm_simple_encoder_init); > + > +static void drm_encoder_destroy(struct drm_encoder *encoder) > +{ > + struct drm_device *dev = encoder->dev; >...
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...me); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) > + return -ENOMEM; > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_cleanup, > + encoder_type, namestr); > + if (ret) > + goto err_kfree; > + > + return 0; > + > +err_kfree: > + if (name) > + kfree(namestr); > + return ret; > +} > +EXPORT_SYMBOL(drm_simple_encoder_init); > + > +static void drm_encoder_destroy(struct drm_encoder *encoder) > +{ > + struct drm_device *dev = encoder->dev; >...
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...et; + + if (name) { + va_list ap; + + va_start(ap, name); + namestr = kvasprintf(GFP_KERNEL, name, ap); + va_end(ap); + if (!namestr) + return -ENOMEM; + } + + ret = __drm_encoder_init(dev, encoder, + &drm_simple_encoder_funcs_cleanup, + encoder_type, namestr); + if (ret) + goto err_kfree; + + return 0; + +err_kfree: + if (name) + kfree(namestr); + return ret; +} +EXPORT_SYMBOL(drm_simple_encoder_init); + +static void drm_encoder_destroy(struct drm_encoder *encoder) +{ + struct drm_device *dev = encoder->dev; + + drm_encoder_cleanup(encoder); + devm_kfree(dev->dev, encoder);...
2020 Feb 07
1
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...NEL, 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); > +} > +EXPORT_SYMBOL(drm_simple_encoder_create); > +
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...RNEL, name, ap); >> + va_end(ap); >> + if (!namestr) >> + return -ENOMEM; >> + } >> + >> + ret = __drm_encoder_init(dev, encoder, >> + &drm_simple_encoder_funcs_cleanup, >> + encoder_type, namestr); >> + if (ret) >> + goto err_kfree; >> + >> + return 0; >> + >> +err_kfree: >> + if (name) >> + kfree(namestr); >> + return ret; >> +} >> +EXPORT_SYMBOL(drm_simple_encoder_init); >> + >> +static void drm_encoder_destroy(struct drm_encoder *encoder) >> +{ >&g...
2018 Sep 06
1
[PATCH net-next 10/11] tap: accept an array of XDP buffs through sendmsg()
...ta_end - xdp->data); > + > + skb_set_network_header(skb, ETH_HLEN); > + skb_reset_mac_header(skb); > + skb->protocol = eth_hdr(skb)->h_proto; > + > + if (vnet_hdr_len) { > + err = virtio_net_hdr_to_skb(skb, gso, tap_is_little_endian(q)); > + if (err) > + goto err_kfree; > + } > + > + skb_probe_transport_header(skb, ETH_HLEN); > + > + /* Move network header to the right position for VLAN tagged packets */ > + if ((skb->protocol == htons(ETH_P_8021Q) || > + skb->protocol == htons(ETH_P_8021AD)) && > + __vlan_get_protoc...
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
2018 Sep 06
0
[PATCH net-next 10/11] tap: accept an array of XDP buffs through sendmsg()
...t;data_hard_start); + skb_put(skb, xdp->data_end - xdp->data); + + skb_set_network_header(skb, ETH_HLEN); + skb_reset_mac_header(skb); + skb->protocol = eth_hdr(skb)->h_proto; + + if (vnet_hdr_len) { + err = virtio_net_hdr_to_skb(skb, gso, tap_is_little_endian(q)); + if (err) + goto err_kfree; + } + + skb_probe_transport_header(skb, ETH_HLEN); + + /* Move network header to the right position for VLAN tagged packets */ + if ((skb->protocol == htons(ETH_P_8021Q) || + skb->protocol == htons(ETH_P_8021AD)) && + __vlan_get_protocol(skb, skb->protocol, &depth) !=...
2020 Feb 18
4
[PATCH v2 0/4] 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
2019 Sep 09
5
[PATCH 0/4] Merge VRAM MM and GEM VRAM source files
VRAM MM and GEM VRAM are only used with each other. This patch set moves VRAM MM into GEM VRAM source files and cleans up the helper's public interface. Thomas Zimmermann (4): drm/vram: Move VRAM memory manager to GEM VRAM implementation drm/vram: Have VRAM MM call GEM VRAM functions directly drm/vram: Unexport internal functions of VRAM MM drm/vram: Unconditonally set BO call-back
2019 Sep 11
4
[PATCH v2 0/4] Merge VRAM MM and GEM VRAM source files
VRAM MM and GEM VRAM are only used with each other. This patch set moves VRAM MM into GEM VRAM source files and cleans up the helper's public interface. Version 2 of the patch set doesn't contain functional changes. I'm reposting due to the rebasing onto the debugfs patches. v2: * updated for debugfs support * fixed typos in comments Thomas Zimmermann (4): drm/vram: Move VRAM
2019 Apr 29
4
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...uptible) > +{ > + struct drm_gem_vram_object *gbo; > + int ret; > + > + gbo = kzalloc(sizeof(*gbo), GFP_KERNEL); > + if (!gbo) > + return ERR_PTR(-ENOMEM); > + > + ret = drm_gem_vram_init(dev, bdev, gbo, size, pg_align, interruptible); > + if (ret < 0) > + goto err_kfree; > + > + return gbo; > + > +err_kfree: > + kfree(gbo); > + return ERR_PTR(ret); > +} > +EXPORT_SYMBOL(drm_gem_vram_create); > + > +/** > + * drm_gem_vram_put() - Releases a reference to a VRAM-backed GEM object > + * @gbo: the GEM VRAM object > + * > + * Se...
2019 Apr 29
4
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...uptible) > +{ > + struct drm_gem_vram_object *gbo; > + int ret; > + > + gbo = kzalloc(sizeof(*gbo), GFP_KERNEL); > + if (!gbo) > + return ERR_PTR(-ENOMEM); > + > + ret = drm_gem_vram_init(dev, bdev, gbo, size, pg_align, interruptible); > + if (ret < 0) > + goto err_kfree; > + > + return gbo; > + > +err_kfree: > + kfree(gbo); > + return ERR_PTR(ret); > +} > +EXPORT_SYMBOL(drm_gem_vram_create); > + > +/** > + * drm_gem_vram_put() - Releases a reference to a VRAM-backed GEM object > + * @gbo: the GEM VRAM object > + * > + * Se...
2019 May 06
0
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...size, + unsigned long pg_align, + bool interruptible) +{ + struct drm_gem_vram_object *gbo; + int ret; + + gbo = kzalloc(sizeof(*gbo), GFP_KERNEL); + if (!gbo) + return ERR_PTR(-ENOMEM); + + ret = drm_gem_vram_init(dev, bdev, gbo, size, pg_align, interruptible); + if (ret < 0) + goto err_kfree; + + return gbo; + +err_kfree: + kfree(gbo); + return ERR_PTR(ret); +} +EXPORT_SYMBOL(drm_gem_vram_create); + +/** + * drm_gem_vram_put() - Releases a reference to a VRAM-backed GEM object + * @gbo: the GEM VRAM object + * + * See ttm_bo_put() for more information. + */ +void drm_gem_vram_put(struc...
2019 Apr 29
0
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...long size, + uint32_t pg_align, + bool interruptible) +{ + struct drm_gem_vram_object *gbo; + int ret; + + gbo = kzalloc(sizeof(*gbo), GFP_KERNEL); + if (!gbo) + return ERR_PTR(-ENOMEM); + + ret = drm_gem_vram_init(dev, bdev, gbo, size, pg_align, interruptible); + if (ret < 0) + goto err_kfree; + + return gbo; + +err_kfree: + kfree(gbo); + return ERR_PTR(ret); +} +EXPORT_SYMBOL(drm_gem_vram_create); + +/** + * drm_gem_vram_put() - Releases a reference to a VRAM-backed GEM object + * @gbo: the GEM VRAM object + * + * See ttm_bo_put() for more information. + */ +void drm_gem_vram_put(struc...
2020 Sep 15
0
[PATCH 01/18] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT flag
...t_fileio(struct vb2_queue *q, int read) fileio->memory = VB2_MEMORY_MMAP; fileio->type = q->type; q->fileio = fileio; - ret = vb2_core_reqbufs(q, fileio->memory, 0, &fileio->count); + ret = vb2_core_reqbufs(q, fileio->memory, &fileio->count); if (ret) goto err_kfree; @@ -2638,7 +2604,7 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read) err_reqbufs: fileio->count = 0; - vb2_core_reqbufs(q, fileio->memory, 0, &fileio->count); + vb2_core_reqbufs(q, fileio->memory, &fileio->count); err_kfree: q->fileio = NULL; @@ -...
2018 Sep 06
22
[PATCH net-next 00/11] Vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2016 Jun 08
7
[PATCH 0/6] virtio_net: use common code for virtio_net_hdr and skb GSO conversion
Hi, This patches introduce virtio_net_hdr_{from,to}_skb functions for conversion of GSO information between skb and virtio_net_hdr. Mike Rapoport (6): virtio_net: add _UAPI prefix to virtio_net header guards virtio_net: introduce virtio_net_hdr_{from,to}_skb macvtap: use common code for virtio_net_hdr and skb GSO conversion tuntap: use common code for virtio_net_hdr and skb GSO