From: Jiri Slaby <jirislaby@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: <linux-kernel@vger.kernel.org>, Dean Anderson <dean@sensoray.com>,
linux-usb@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Slaby <jirislaby@gmail.com>
Subject: [PATCH] USB: s2255drv, fix memset(0)
Date: Mon, 10 Mar 2008 15:36:47 +0100 [thread overview]
Message-ID: <1205159807-11701-1-git-send-email-jirislaby@gmail.com> (raw)
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
reply other threads:[~2008-03-10 14:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1205159807-11701-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dean@sensoray.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®