Remove NULL checks for bdrv_new return value

It's an indirect call to qemu_malloc, which never returns an error.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf 2010-12-16 15:37:41 +01:00
parent 15654a6d7c
commit ad7171394f
4 changed files with 7 additions and 19 deletions

View file

@ -1509,8 +1509,6 @@ static int openfile(char *name, int flags, int growable)
}
} else {
bs = bdrv_new("hda");
if (!bs)
return 1;
if (bdrv_open(bs, name, flags, NULL) < 0) {
fprintf(stderr, "%s: can't open device %s\n", progname, name);