rapidio: fix potential NULL pointer dereference
authorVladimir Zapolskiy <vz@mleia.com>
Thu, 28 Apr 2016 23:19:06 +0000 (16:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Apr 2016 02:34:04 +0000 (19:34 -0700)
commit99f23c2cded85a377325aa9fd374ffa3d55d1088
tree9bf18f1185d2c316ac58a2f9ca504c39c136b775
parentc2e7e00b715d3c65f301bec8559d6af4ef8098ab
rapidio: fix potential NULL pointer dereference

The change fixes improper check for a returned error value by
class_create() function, which on error returns ERR_PTR() value, thus the
original check always results in a dead code on error path.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
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/devices/rio_mport_cdev.c
This page took 0.026065 seconds and 5 git commands to generate.