summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2014-12-05 17:08:45 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-09 17:30:20 -0800
commitc62bddfb6aea7e2fa5ba85f83f71e17e8e681e55 (patch)
tree659fa201a6b3de22c315fc002acecc8c7e00f27f
parent20eca8f096867fdbd890a8c16a05fb0bd9a7ca06 (diff)
staging: unisys: fix strict checks in create_device()
Use the variable name rather than the type, and add a set of missing brackets to the if statement in create_device(). Signed-off-by: Ken Depro <kenneth.depro@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/unisys/uislib/uislib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 1ddbe78999ae..8a48091f993e 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -361,7 +361,7 @@ create_device(struct controlvm_message *msg, char *buf)
POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo,
POSTCODE_SEVERITY_INFO);
- dev = kzalloc(sizeof(struct device_info), GFP_ATOMIC);
+ dev = kzalloc(sizeof(*dev), GFP_ATOMIC);
if (!dev) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed: kmalloc for dev failed.\n");
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
@@ -377,9 +377,9 @@ create_device(struct controlvm_message *msg, char *buf)
sema_init(&dev->interrupt_callback_lock, 1); /* unlocked */
sprintf(dev->devid, "vbus%u:dev%u", (unsigned)busNo, (unsigned)devNo);
/* map the channel memory for the device. */
- if (msg->hdr.flags.test_message)
+ if (msg->hdr.flags.test_message) {
dev->chanptr = (void __iomem *)__va(dev->channel_addr);
- else {
+ } else {
pReqHandler = req_handler_find(dev->channel_uuid);
if (pReqHandler)
/* generic service handler registered for this