Skip to content

Commit

Permalink
ide-floppy: zero out the whole struct ide_atapi_pc on init
Browse files Browse the repository at this point in the history
This is a precaution just to make sure a new pc is clean when allocated.

There should be no functional change introduced by this patch.

[bart: ported it over IDE changes]

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jul 16, 2008
1 parent c96a7df commit 68dc357
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,7 @@ static void ide_floppy_callback(ide_drive_t *drive)

static void idefloppy_init_pc(struct ide_atapi_pc *pc)
{
memset(pc->c, 0, 12);
pc->retries = 0;
pc->flags = 0;
pc->req_xfer = 0;
memset(pc, 0, sizeof(*pc));
pc->buf = pc->pc_buf;
pc->buf_size = IDEFLOPPY_PC_BUFFER_SIZE;
pc->callback = ide_floppy_callback;
Expand Down

0 comments on commit 68dc357

Please sign in to comment.