rapidio: fix potential null deref on failure path
authorDan Carpenter <[error27@gmail.com]>
Wed, 23 Mar 2011 23:43:07 +0000 (16:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:44 +0000 (19:46 -0700)
commitad4ac17ad1e2f0bd0ce38b2585c5d7fa2b0780dc
treecfc612adbeb9a5d0a6b0e1ee35d14eb963058e77
parentc1256ebe6a10bb3e104ecb2d1a458f9907ee49fb
rapidio: fix potential null deref on failure path

If rio is not a switch then "rswitch" is null.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Alexandre Bounine <alexandre.bounine@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