From: Fabian Frederick Date: Mon, 13 Oct 2014 20:21:46 +0000 (+0200) Subject: caif: replace kmalloc/memset 0 by kzalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ff1e1e3c81426515e1782f2f13b7237211a43df;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git caif: replace kmalloc/memset 0 by kzalloc Also add blank line after declaration Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller --- diff --git a/net/caif/cfmuxl.c b/net/caif/cfmuxl.c index 8c5d6386319f..510aa5a753f0 100644 --- a/net/caif/cfmuxl.c +++ b/net/caif/cfmuxl.c @@ -47,10 +47,10 @@ static struct cflayer *get_up(struct cfmuxl *muxl, u16 id); struct cflayer *cfmuxl_create(void) { - struct cfmuxl *this = kmalloc(sizeof(struct cfmuxl), GFP_ATOMIC); + struct cfmuxl *this = kzalloc(sizeof(struct cfmuxl), GFP_ATOMIC); + if (!this) return NULL; - memset(this, 0, sizeof(*this)); this->layer.receive = cfmuxl_receive; this->layer.transmit = cfmuxl_transmit; this->layer.ctrlcmd = cfmuxl_ctrlcmd;