Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp369933pxb; Thu, 9 Sep 2021 02:54:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlKaLSeTliJcB0emOs4eBDyLtyf2hdAnpbyxSVtE573WOtDod/cX0VCEyXZNY9TJTnRW8T X-Received: by 2002:a5e:8e04:: with SMTP id a4mr1923232ion.56.1631181267898; Thu, 09 Sep 2021 02:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631181267; cv=none; d=google.com; s=arc-20160816; b=tH+51/6xB/g76S5UUWnRKblWIJkxYoJn58AfQRuuudXgLDEKo7zO3dRYeRT2pAQg4l eEVeBneYbcmBfY7bQ/ceKQa24qvmKzNDtwevFLQvGUG1TOQ56Xc5AToB6F2aa4F0rNCT yAzfLUGhGpZCh9I+k1xmcajEP7o13mru7jVt6jl+XQ0egMyYPdseLSAfIH0Dkpkum62N nXJLMzDJwpg3IpGm/3r3E6qKkDhilojKD9ZCjhB+5tBccxz6Jczw8+b8WkteYm/ytj+z XU9Kp6JQIQVRVe1LRxK0Zd/glhk8QjCQpT+XX9nhXtme6dg8G70D+dpSPq8PoNnZvSJr xz3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=UCqsI2wA8mbBsqG+Jih6t3ziqfxGqlB2u8W0ElSR96E=; b=HH4ym9zYFEAy63OicXTMxzRtDuAjSqMLn88APjXxiiud5yGkzdioEY/Ywqt+tF8AvW NUi75OqUpE90705/fTCr/+Gzn4ILWWS2sx7191+Ed2/q1Mwy6iPG/fouG+4rMwV/KiZy a7/ie0FLvrJhRE+ErxCU6nuod4tVHS8can9kQLIaLtAiuJaA5vbKaSR4HzVk6sL2RyRC 6zhc9Y0ztxb8hzZvdcOQx7SRdbTklw7bgDJ85Fd3CRoui9jWlnU0354a6E21s21XeGSn yn5A0shagDmwume5U/WsFcISs3nwmG40lzy7vY4q8mti60YCHM0lhQyS9p6n2cddovw3 vpDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si1299542jat.3.2021.09.09.02.54.15; Thu, 09 Sep 2021 02:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232995AbhIIJyn (ORCPT + 99 others); Thu, 9 Sep 2021 05:54:43 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:49671 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbhIIJym (ORCPT ); Thu, 9 Sep 2021 05:54:42 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R301e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UnmeSdP_1631181191; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UnmeSdP_1631181191) by smtp.aliyun-inc.com(127.0.0.1); Thu, 09 Sep 2021 17:53:21 +0800 From: Jiapeng Chong To: mst@redhat.com Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, chongjiapeng Subject: [PATCH] vduse: Fix missing error code in vduse_init() Date: Thu, 9 Sep 2021 17:53:04 +0800 Message-Id: <1631181184-120692-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: chongjiapeng The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. Eliminate the follow smatch warning: drivers/vdpa/vdpa_user/vduse_dev.c:1597 vduse_init() warn: missing error code 'ret'. Reported-by: Abaci Robot Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace") Signed-off-by: chongjiapeng --- drivers/vdpa/vdpa_user/vduse_dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c index 5c25ff6..6a8878d 100644 --- a/drivers/vdpa/vdpa_user/vduse_dev.c +++ b/drivers/vdpa/vdpa_user/vduse_dev.c @@ -1593,8 +1593,10 @@ static int vduse_init(void) vduse_irq_wq = alloc_workqueue("vduse-irq", WQ_HIGHPRI | WQ_SYSFS | WQ_UNBOUND, 0); - if (!vduse_irq_wq) + if (!vduse_irq_wq) { + ret = -EINVAL; goto err_wq; + } ret = vduse_domain_init(); if (ret) -- 1.8.3.1