From: Dan Carpenter Date: Thu, 12 Mar 2015 17:24:31 +0000 (+0300) Subject: staging: dgnc: some off by one bugs X-Git-Tag: omap-for-v4.2/o2_dc~155^2~138^2~110 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bef52f377b6410a89fc580a8948033f613854f8;p=pandora-kernel.git staging: dgnc: some off by one bugs "dgnc_NumBoards" is the number of filled out elements in the dgnc_Board[] array. "->nasync" and "->maxports" are the same value. They are the number of channels in the ->channels[] array so these tests should be ">=" instead of ">" so we avoid reading past the end of the arrays. I cleaned up the conditions in dgnc_mgmt_ioctl() a bit. There was a work around for the off by one bug in the case where there were no boards which is no longer needed. "channel" is unsigned so it can't be negative. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed