net/virtio-user: fix return value not checked
authorJianfeng Tan <jianfeng.tan@intel.com>
Wed, 29 Jun 2016 09:05:33 +0000 (09:05 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 5 Jul 2016 11:30:00 +0000 (13:30 +0200)
commit404bd6bfe360ce052aad7953ab3fc3ab995c21e8
tree7d4b8cf64000d906eccfc0e2793ba4118df46ca6
parent17450351fff8cc63624c0ab4d46a8f5eec37c802
net/virtio-user: fix return value not checked

When return values of function calls are not checked, Coverity will
report errors like:

    if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1)
    >>>     CID 127477:    (CHECKED_RETURN)
    >>>     Calling "rte_kvargs_process" without checking return value
            (as is done elsewhere 25 out of 30 times).
          rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PATH,
             &get_string_arg, &path);

Coverity issue: 127477, 127478
Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device")
Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_user/vhost_user.c
drivers/net/virtio/virtio_user_ethdev.c