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: 14b50f80c3 ('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>
This commit is contained in:
Dan Carpenter 2015-08-01 16:08:17 -07:00 коммит произвёл Greg Kroah-Hartman
Родитель b81658cf5d
Коммит 9dd6a06430
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -186,7 +186,7 @@ int hvutil_transport_send(struct hvutil_transport *hvt, void *msg, int len)
return -EINVAL; return -EINVAL;
} else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) { } else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) {
cn_msg = kzalloc(sizeof(*cn_msg) + len, GFP_ATOMIC); cn_msg = kzalloc(sizeof(*cn_msg) + len, GFP_ATOMIC);
if (!msg) if (!cn_msg)
return -ENOMEM; return -ENOMEM;
cn_msg->id.idx = hvt->cn_id.idx; cn_msg->id.idx = hvt->cn_id.idx;
cn_msg->id.val = hvt->cn_id.val; cn_msg->id.val = hvt->cn_id.val;