virtio-serial: Fix check for 'assert'; prevent NULL derefs
commita1c5975270f2335e1d7129c084a6e562d7b99bdd
authorAmit Shah <amit.shah@redhat.com>
Fri, 30 Apr 2010 11:13:55 +0000 (30 16:43 +0530)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 3 May 2010 17:09:48 +0000 (3 12:09 -0500)
tree75f63b60e1cbe9b75684445021b933f973270e22
parentf8778a7785d530515b0db395606f327fd5f94a92
virtio-serial: Fix check for 'assert'; prevent NULL derefs

In the flush_queued_data() function, we expect port to be valid. Assert
only for port and not port || discard.

Reported-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-serial-bus.c