Skip to content

Commit

Permalink
caif_usb: use target structure member in memset
Browse files Browse the repository at this point in the history
parent cfusbl was used instead of first structure member 'layer'

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Fabian Frederick authored and David S. Miller committed Oct 14, 2014
1 parent 7970f19 commit 91c4467
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/caif/caif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 91c4467

Please sign in to comment.