From: Dan Carpenter Date: Tue, 15 Dec 2015 10:07:52 +0000 (+0300) Subject: mISDN: fix a loop count X-Git-Tag: v3.2.76~58 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eb2a0151e7c8a95d1be33a923718fb690452c61;p=pandora-kernel.git mISDN: fix a loop count commit 40d24c4d8a7430aa4dfd7a665fa3faf3b05b673f upstream. There are two issue here. 1) cnt starts as maxloop + 1 so all these loops iterate one more time than intended. 2) At the end of the loop we test for "if (maxloop && !cnt)" but for the first two loops, we end with cnt equal to -1. Changing this to a pre-op means we end with cnt set to 0. Fixes: cae86d4a4e56 ('mISDN: Add driver for Infineon ISDN chipset family') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed