hw/usb-storage: Check whether BB is inserted
commit7d3467d903c0fa663fbe3f1002e7c624a210b634
authorMax Reitz <mreitz@redhat.com>
Mon, 19 Oct 2015 15:53:17 +0000 (19 17:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 23 Oct 2015 16:18:23 +0000 (23 18:18 +0200)
tree2669abd9944a8c2833a4bd0996a6cc7300831774
parent2e1280e8ff95b3145bc6262accc9d447718e5318
hw/usb-storage: Check whether BB is inserted

Only call bdrv_add_key() on the BlockDriverState if it is not NULL.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/usb/dev-storage.c