]> git.baikalelectronics.ru Git - kernel.git/commit
RapidIO: fix potential null deref in rio_setup_device()
authorAlexandre Bounine <alexandre.bounine@idt.com>
Wed, 2 Nov 2011 20:39:11 +0000 (13:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Nov 2011 23:07:01 +0000 (16:07 -0700)
commit27991aa8f1980dcb65df8ce92e523cb948e76790
tree840b302ae67f40a735f9612ad5243d5f012aa57a
parent20e568d6ba2b75d3af4455e025a0b67ba6f5a84b
RapidIO: fix potential null deref in rio_setup_device()

The "goto cleanup" path can deference "rswitch" when it is NULL.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Chul Kim <chul.kim@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rapidio/rio-scan.c