Commit a04c640e authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: loopback: fix the type attribute check

In gb_loopback_check_attr(), the value of gb->type is checked for
validity.  The only valid values are 0, 1, and 2.  But the check
allows the value 3.  Fix that.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 64a54801
......@@ -123,7 +123,7 @@ static void gb_loopback_check_attr(struct gb_loopback *gb)
{
if (gb->ms_wait > 1000)
gb->ms_wait = 1000;
if (gb->type > 3)
if (gb->type > 2)
gb->type = 0;
if (gb->size > GB_LOOPBACK_SIZE_MAX)
gb->size = GB_LOOPBACK_SIZE_MAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment