diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-10-13 22:21:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-14 22:04:07 +0200 |
commit | 6ff1e1e3c81426515e1782f2f13b7237211a43df (patch) | |
tree | 5e03896946838d512f449f670f881f0f60c01b47 /net/caif | |
parent | drivers: net: cpsw: remove child devices while driver detach (diff) | |
download | linux-6ff1e1e3c81426515e1782f2f13b7237211a43df.tar.xz linux-6ff1e1e3c81426515e1782f2f13b7237211a43df.zip |
caif: replace kmalloc/memset 0 by kzalloc
Also add blank line after declaration
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r-- | net/caif/cfmuxl.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |