LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] USB: s2255drv, fix memset(0)
@ 2008-03-10 14:36 Jiri Slaby
  0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2008-03-10 14:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Dean Anderson, linux-usb, Andrew Morton, Jiri Slaby

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 <jirislaby@gmail.com>
---
 drivers/usb/image/s2255drv.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/image/s2255drv.c b/drivers/usb/image/s2255drv.c
index e1cf2dc..2d15a36 100644
--- a/drivers/usb/image/s2255drv.c
+++ b/drivers/usb/image/s2255drv.c
@@ -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;
-- 
1.5.4.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-10 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-10 14:36 [PATCH] USB: s2255drv, fix memset(0) Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).