Skip to content

Commit

Permalink
lcs: ensure proper ccw setup
Browse files Browse the repository at this point in the history
Make sure that all ccws used for writing are initialized with
zeros - especially since the last ccw contains a TIC for which
the unused fields have to be zeros.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sebastian Ott authored and David S. Miller committed Sep 24, 2012
1 parent 725b9c0 commit 3c78747
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/net/lcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ lcs_setup_write_ccws(struct lcs_card *card)

LCS_DBF_TEXT(3, setup, "iwritccw");
/* Setup write ccws. */
memset(card->write.ccws, 0, sizeof(struct ccw1) * LCS_NUM_BUFFS + 1);
memset(card->write.ccws, 0, sizeof(struct ccw1) * (LCS_NUM_BUFFS + 1));
for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) {
card->write.ccws[cnt].cmd_code = LCS_CCW_WRITE;
card->write.ccws[cnt].count = 0;
Expand Down

0 comments on commit 3c78747

Please sign in to comment.