From: Dan Carpenter Date: Fri, 23 Apr 2010 12:01:04 +0000 (+0200) Subject: [SCSI] pm8001: potential null dereference in pm8001_dev_gone_notify() X-Git-Tag: v2.6.35-rc1~470^2^2~55 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2471b894068ec59ab3012e788401b345ef459e49;p=pandora-kernel.git [SCSI] pm8001: potential null dereference in pm8001_dev_gone_notify() In the original code we dereferenced "pm8001_dev" before checking if it was null. This patch moves the dereference inside the condition. This was found by a static checker (smatch). I looked, but I couldn't tell if "pm8001_dev" dev was ever actually null. The approach in this patch seemed like the safest response. Signed-off-by: Dan Carpenter Acked-by: Jack Wang Signed-off-by: James Bottomley --- Reading git-diff-tree failed