From patchwork Thu Feb 4 08:05:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Yongjun X-Patchwork-Id: 12066501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29E80C433E6 for ; Thu, 4 Feb 2021 08:05:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D528164F5C for ; Thu, 4 Feb 2021 08:05:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234875AbhBDIF0 (ORCPT ); Thu, 4 Feb 2021 03:05:26 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12419 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234863AbhBDIFQ (ORCPT ); Thu, 4 Feb 2021 03:05:16 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DWWJc1DFVzjGlq; Thu, 4 Feb 2021 16:03:28 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Thu, 4 Feb 2021 16:04:24 +0800 From: Zheng Yongjun To: , , CC: , , , , , , , Zheng Yongjun Subject: [PATCH -next] KVM: s390: Return the correct errno code Date: Thu, 4 Feb 2021 16:05:23 +0800 Message-ID: <20210204080523.18943-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Originating-IP: [10.175.138.68] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org When valloc failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun --- arch/s390/kvm/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 2f177298c663..6b7acc27cfa2 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -2252,7 +2252,7 @@ static int get_all_floating_irqs(struct kvm *kvm, u8 __user *usrbuf, u64 len) */ buf = vzalloc(len); if (!buf) - return -ENOBUFS; + return -ENOMEM; max_irqs = len / sizeof(struct kvm_s390_irq);