summaryrefslogtreecommitdiffstats
path: root/net/caif/cfveil.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/caif/cfveil.c')
-rw-r--r--net/caif/cfveil.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/caif/cfveil.c b/net/caif/cfveil.c
index 3ec83fbc288..910ab0661f6 100644
--- a/net/caif/cfveil.c
+++ b/net/caif/cfveil.c
@@ -25,13 +25,10 @@ static int cfvei_transmit(struct cflayer *layr, struct cfpkt *pkt);
struct cflayer *cfvei_create(u8 channel_id, struct dev_info *dev_info)
{
- struct cfsrvl *vei = kmalloc(sizeof(struct cfsrvl), GFP_ATOMIC);
- if (!vei) {
- pr_warn("Out of memory\n");
+ struct cfsrvl *vei = kzalloc(sizeof(struct cfsrvl), GFP_ATOMIC);
+ if (!vei)
return NULL;
- }
caif_assert(offsetof(struct cfsrvl, layer) == 0);
- memset(vei, 0, sizeof(struct cfsrvl));
cfsrvl_init(vei, channel_id, dev_info, true);
vei->layer.receive = cfvei_receive;
vei->layer.transmit = cfvei_transmit;