mic_virtio: robust feature array size calculation
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 27 Nov 2014 11:29:24 +0000 (13:29 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Dec 2014 10:05:23 +0000 (12:05 +0200)
commit0ffaeadfc451a11b5da35578b2f9b977f9f46489
tree930739568abe771406bd9e9a01c11c8707958f42
parente16e12be34648777606a2c03a3526409b38f0e63
mic_virtio: robust feature array size calculation

mic reads sizeof(vdev->features) bits from device, but in fact it stores
bits in local features variable. use sizeof(features) to make code
robust against future changes extending sizeof(vdev->features).

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/misc/mic/card/mic_virtio.c