greybus: manifest: descriptor size should be >= header size
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 24 Mar 2015 11:38:13 +0000 (17:08 +0530)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 24 Mar 2015 19:59:03 +0000 (20:59 +0100)
commit19b3b2c2aeb7e1e787a65936ada0dabc229620ea
tree6ba6446a2c2c4797c3363ac1f59ebe5f164e4615
parent59e3344461baeab1a605543aec0ff9ddf209b20f
greybus: manifest: descriptor size should be >= header size

We are calculating descriptors expected size differently based on the type of
descriptor, that's fine but at few places we aren't taking size of the header
into account. And that looks wrong.

Lets make sure it is atleast as big as descriptor's header.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/manifest.c