USB: s2255drv, fix memset(0)
PATCH 1/1 USB: s2255drv, fix memset(0)
Swap second and third paramter of memset in s2255_board_init, since it's apparently wrong. Also do not re-init its entries to 0 again.
Signed-off-by Jiri Slaby <[email protected]>
--- drivers/usb/image/s2255drv.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/usb/image/s2255drv.c +1 -3
@@ -2393,9 +2393,7 @@ static int s2255_board_init(struct s2255_dev *dev)for (j =0 ; j <MAX_PIPE_BUFFERS ; j++) {struct s2255_pipeinfo *pipe = &dev->pipes[j]; -memset (pipe,sizeof (struct s2255_pipeinfo ),0 ); - pipe->state =0 ; - pipe->prev_state =0 ; +memset (pipe,0 ,sizeof (*pipe)); pipe->dev = dev; pipe->cur_transfer_size =DEFAULT_PIPE_USBBLOCK ; pipe->max_transfer_size =MAX_PIPE_USBBLOCK ;
Signature · 1 line
1.5.4.1