From: Tiwei Bie Date: Wed, 7 Nov 2018 09:01:02 +0000 (+0800) Subject: vhost: remove unneeded null pointer check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0541588a44bff07e4aae4c9cde8586326955c378;p=dpdk.git vhost: remove unneeded null pointer check The caller will guarantee that msg won't be null. Remove the unneeded null pointer check which caused a Coverity warning. Coverity issue: 323484 Fixes: 8f972312b8f4 ("vhost: support vhost-user") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index cc154f312d..3ea64eba62 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1732,7 +1732,7 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg) if (ret <= 0) return ret; - if (msg && msg->size) { + if (msg->size) { if (msg->size > sizeof(msg->payload)) { RTE_LOG(ERR, VHOST_CONFIG, "invalid msg size: %d\n", msg->size);