]> git.proxmox.com Git - mirror_qemu.git/commit
m25p80: fix s->blk usage before assignment
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 15 Apr 2015 09:43:44 +0000 (10:43 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Apr 2015 13:36:09 +0000 (15:36 +0200)
commitc485cf9c9277ca9b3d5227c99a13c374e812f42b
treeff8f732cc74598d2639713fda1a3a0f896f65f81
parentd07063e46047242c4f010ff9ddbff5e02f15d9e7
m25p80: fix s->blk usage before assignment

Delay the call to blk_blockalign() until s->blk has been assigned.

This never caused a crash because blk_blockalign(NULL, size) defaults to
4096 alignment but it's technically incorrect.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1429091024-25098-1-git-send-email-stefanha@redhat.com
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/m25p80.c