summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/audio_codec.h
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>2016-08-16 12:36:50 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-08-18 17:32:39 +0200
commit15c726ea5218b4e40d2331bd8b25b85848f73c42 (patch)
tree8b73b419b424ec82b413ba4e74523e22b878c711 /drivers/staging/greybus/audio_codec.h
parent0900845ab741dd7b0b8b3f03ded0ffc6a348dd90 (diff)
greybus: audio: Add check for invalid index while mapping control
While mapping control id to define DAPM routes, invalid control index may cause kernel oops. Add extra check to validate index while mapping names to control_id. Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.h')
-rw-r--r--drivers/staging/greybus/audio_codec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index 0de2ad99003b..0153809e72ab 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -132,6 +132,7 @@ struct gbaudio_control {
char *name;
char *wname;
const char * const *texts;
+ int items;
struct list_head list;
};