From: Fabian Frederick Date: Tue, 14 Oct 2014 17:01:14 +0000 (+0200) Subject: caif_usb: use target structure member in memset X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91c4467e3c76b6d40ecc29ed71d3aa1e0285ab80;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git caif_usb: use target structure member in memset parent cfusbl was used instead of first structure member 'layer' Suggested-by: Joe Perches Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller --- diff --git a/net/caif/caif_usb.c b/net/caif/caif_usb.c index 0e487b07cf96..5cd44f001f64 100644 --- a/net/caif/caif_usb.c +++ b/net/caif/caif_usb.c @@ -92,7 +92,7 @@ static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN], caif_assert(offsetof(struct cfusbl, layer) == 0); - memset(this, 0, sizeof(struct cflayer)); + memset(&this->layer, 0, sizeof(this->layer)); this->layer.receive = cfusbl_receive; this->layer.transmit = cfusbl_transmit; this->layer.ctrlcmd = cfusbl_ctrlcmd;