From: Bartlomiej Zolnierkiewicz Date: Sun, 26 Jul 2009 14:21:01 +0000 (+0200) Subject: libata: add missing NULL pointer check to ata_eh_reset() X-Git-Tag: v2.6.31-rc5~68^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=705d201414382b0966d7c903d738dfdb9380e4af;p=pandora-kernel.git libata: add missing NULL pointer check to ata_eh_reset() drivers/ata/libata-eh.c +2403 ata_eh_reset(80) warning: variable derefenced before check 'slave' Please note that this is _not_ a real bug at the moment since ata_eh_context structure is embedded into ata_list structure and the code alwas checks for 'slave' before accessing 'sehc'. Anyway lets add missing check and always have a valid 'sehc' pointer (which makes code easier to understand and prevents introducing some possible bugs in the future). Reported-by: Dan Carpenter Cc: corbet@lwn.net Cc: eteo@redhat.com Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed