summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorSudip Mukherjee2014-11-07 13:18:35 +0100
committerGreg Kroah-Hartman2014-11-07 18:22:46 +0100
commit930a021f2ec59d2143ca86a357773128785ed16f (patch)
tree77266a6bcbfbd20f93e428313668adb4f31a9849 /drivers/staging/unisys
parentstaging: unisys: unneeded NULL check (diff)
downloadkernel-qcow2-linux-930a021f2ec59d2143ca86a357773128785ed16f.tar.gz
kernel-qcow2-linux-930a021f2ec59d2143ca86a357773128785ed16f.tar.xz
kernel-qcow2-linux-930a021f2ec59d2143ca86a357773128785ed16f.zip
staging: unisys: dereferencing NULL pointer
we can reach the label Away in total five situation and in four of of them pDevInfo is NULL. so we were basically dereferencing a NULL pointer. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorchipset/visorchipset_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index b5a0e460da07..c8f7beaac87a 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -1298,7 +1298,8 @@ my_device_create(struct controlvm_message *inmsg)
POSTCODE_SEVERITY_INFO);
Away:
/* get the bus and devNo for DiagPool channel */
- if (is_diagpool_channel(pDevInfo->chan_info.channel_type_uuid)) {
+ if (pDevInfo &&
+ is_diagpool_channel(pDevInfo->chan_info.channel_type_uuid)) {
g_diagpoolBusNo = busNo;
g_diagpoolDevNo = devNo;
LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",