summaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-08-01 16:08:17 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-04 22:29:45 -0700
commit9dd6a06430c94299651d74b9ed5ca8396ab8ff1f (patch)
treeaf20c6d1954cfdc92bbb6b8de7aaf68c14c06b59 /drivers/hv
parentb81658cf5d44e07c70c93e3b2aefe848eaaba99f (diff)
downloadop-kernel-dev-9dd6a06430c94299651d74b9ed5ca8396ab8ff1f.zip
op-kernel-dev-9dd6a06430c94299651d74b9ed5ca8396ab8ff1f.tar.gz
hv: util: checking the wrong variable
We don't catch this allocation failure because there is a typo and we check the wrong variable. Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/hv_utils_transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
index ea7ba5e..6a9d80a 100644
--- a/drivers/hv/hv_utils_transport.c
+++ b/drivers/hv/hv_utils_transport.c
@@ -186,7 +186,7 @@ int hvutil_transport_send(struct hvutil_transport *hvt, void *msg, int len)
return -EINVAL;
} else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) {
cn_msg = kzalloc(sizeof(*cn_msg) + len, GFP_ATOMIC);
- if (!msg)
+ if (!cn_msg)
return -ENOMEM;
cn_msg->id.idx = hvt->cn_id.idx;
cn_msg->id.val = hvt->cn_id.val;
OpenPOWER on IntegriCloud