wm8750: Fix calculation of number of array elements
Coverity says that the division by sizeof(*s->rate) might be wrong.
I think that coverity is right.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
diff --git a/hw/wm8750.c b/hw/wm8750.c
index 39383f4..9fbdf3d 100644
--- a/hw/wm8750.c
+++ b/hw/wm8750.c
@@ -563,7 +563,7 @@
{
WM8750State *s = opaque;
- s->rate_vmstate = (s->rate - wm_rate_table) / sizeof(*s->rate);
+ s->rate_vmstate = s->rate - wm_rate_table;
}
static int wm8750_post_load(void *opaque, int version_id)