aboutsummaryrefslogtreecommitdiff
path: root/blockjob.c
diff options
context:
space:
mode:
authorChanglong Xie <xiecl.fnst@cn.fujitsu.com>2016-06-23 16:57:20 +0800
committerJeff Cody <jcody@redhat.com>2016-06-28 23:08:13 -0400
commitb48100cf07c94f66feef6886d3697eac8635bce4 (patch)
tree13d54f6367e22bdf927cce40861d41713ad762d3 /blockjob.c
parentccee3d8f97781515ed40356f1e6a7a233dd466b8 (diff)
blockjob: assert(cb) when create job
Callback for block job should always exist Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Message-id: 1466672241-22485-2-git-send-email-xiecl.fnst@cn.fujitsu.com Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r--blockjob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/blockjob.c b/blockjob.c
index 90c4e262b0..205da9df4e 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -110,6 +110,7 @@ void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs,
BlockBackend *blk;
BlockJob *job;
+ assert(cb);
if (bs->job) {
error_setg(errp, QERR_DEVICE_IN_USE, bdrv_get_device_name(bs));
return NULL;