diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-12-16 15:37:41 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-12-17 16:11:03 +0100 |
commit | ad7171394f2fe3f9b5fe02f0c62496291a859a92 (patch) | |
tree | fe0487891f82d023bb3cdc12dba037a48ad2424d /qemu-img.c | |
parent | 15654a6d7c3269e922b92f9596e48078c9bfcbfa (diff) |
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>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c index 0b871d842c..afd9ed2e0e 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -215,10 +215,7 @@ static BlockDriverState *bdrv_new_open(const char *filename, char password[256]; bs = bdrv_new(""); - if (!bs) { - error_report("Not enough memory"); - goto fail; - } + if (fmt) { drv = bdrv_find_format(fmt); if (!drv) { |