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)
commit166c050bda80bb5dd627a287b6efcdfb68d172b4
tree840b302ae67f40a735f9612ad5243d5f012aa57a
parent48618fb4e522d9d02e217ac05f52749545c1af20
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