From: Dan Carpenter Date: Thu, 19 Aug 2010 10:00:22 +0000 (-0300) Subject: V4L/DVB: saa7164: move dereference under NULL check X-Git-Tag: v2.6.36-rc8~32^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23e64d55859ea619c17832645e0e56faac84d750;p=pandora-kernel.git V4L/DVB: saa7164: move dereference under NULL check The original code dereferenced "port" before checking it for NULL. I moved the test down below the check. Also I changed the comparisons a little so people wouldn't get confused and think "port" and "buf" were ints instead of pointers. (Probably that's what lead to this issue in the first place.) There is only one caller for this function and it passes non-NULL pointers, so this is essentially a cleanup rather than a bugfix. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed