greybus: hd: fix cport-count check
authorJohan Hovold <johan@hovoldconsulting.com>
Sun, 22 Nov 2015 09:12:58 +0000 (10:12 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 24 Nov 2015 03:23:27 +0000 (19:23 -0800)
commitbfe2c99c1cd346b06a7d34274b9b826d40ab40a1
treede9fbddeb794a023ff5057c2de263806f1067b4b
parent39f36c8f9ff6203301a1d7feb7f51d2563abbd3a
greybus: hd: fix cport-count check

Fix off-by-one error when checking the number of cports a host-device
supports.

The CPORT_ID_MAX is the largest valid cport id so the maximum number of
cports a host-device can use is CPORT_ID_MAX + 1.

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