mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-03-05 11:10:09 +00:00
ide-floppy: zero out the whole struct ide_atapi_pc on init
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>
This commit is contained in:
parent
c96a7df8db
commit
68dc3575e0
@ -351,10 +351,7 @@ static void ide_floppy_callback(ide_drive_t *drive)
|
|||||||
|
|
||||||
static void idefloppy_init_pc(struct ide_atapi_pc *pc)
|
static void idefloppy_init_pc(struct ide_atapi_pc *pc)
|
||||||
{
|
{
|
||||||
memset(pc->c, 0, 12);
|
memset(pc, 0, sizeof(*pc));
|
||||||
pc->retries = 0;
|
|
||||||
pc->flags = 0;
|
|
||||||
pc->req_xfer = 0;
|
|
||||||
pc->buf = pc->pc_buf;
|
pc->buf = pc->pc_buf;
|
||||||
pc->buf_size = IDEFLOPPY_PC_BUFFER_SIZE;
|
pc->buf_size = IDEFLOPPY_PC_BUFFER_SIZE;
|
||||||
pc->callback = ide_floppy_callback;
|
pc->callback = ide_floppy_callback;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user