From: Maarten Lankhorst Date: Sun, 24 Mar 2013 14:36:38 +0000 (+0100) Subject: drm/nouveau: fix handling empty channel list in ioctl's X-Git-Tag: v3.9-rc6~28^2~1^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b43decd2c513ae44a5462a1a4c2622f0fa77c9e0;p=pandora-kernel.git drm/nouveau: fix handling empty channel list in ioctl's If there are no channels, chan would never end up being NULL, and so the null pointer check would fail. Solve this by initializing chan to NULL, and iterating over temp instead. Fixes oops when running intel-gpu-tools/tests/kms_flip, which attempts to do some intel ioctl's on a nouveau device. Signed-off-by: Maarten Lankhorst Cc: stable@vger.kernel.org [3.7+] Signed-off-by: Ben Skeggs --- Reading git-diff-tree failed