Skip to content

Commit

Permalink
staging: octeon-usb: Cocci spatch "noderef"
Browse files Browse the repository at this point in the history
sizeof when applied to a pointer typed expression gives the size of the
pointer.
Found by coccinelle spatch "misc/noderef.cocci"

Signed-off-by: Thomas Meyer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
thomasmey authored and gregkh committed Sep 25, 2013
1 parent f685344 commit 0a69bb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/octeon-usb/cvmx-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ int cvmx_usb_initialize(struct cvmx_usb_state *state, int usb_port_number,
}
}

memset(usb, 0, sizeof(usb));
memset(usb, 0, sizeof(*usb));
usb->init_flags = flags;

/* Initialize the USB state structure */
Expand Down

0 comments on commit 0a69bb4

Please sign in to comment.