Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp739590pxj; Fri, 7 May 2021 20:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqzdSJbYqycZJ43wcDzuDQ8GTyknQ4sIomDPpxvLe9sjQVSj0MXZ4HxFsJal6iCGvcxH20 X-Received: by 2002:a17:902:9a87:b029:ed:ea18:b2f3 with SMTP id w7-20020a1709029a87b02900edea18b2f3mr13021332plp.69.1620444219914; Fri, 07 May 2021 20:23:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620444219; cv=none; d=google.com; s=arc-20160816; b=IC+UNIf9WZsdetIRjVJWtXK0CNaS0uDzDeFepaIeRlNoLmYQq+9m3FbgkASuFlBY5n kgNOl4yEHLE5LUNjvvB2Fwst3elzS/EcG8Z3q8y/eIdByObDe4mvdPjH/f5tzS/T7KMK K7aTBh/s+QNGO5Tauir2A8BTzMo+5IMRXN/oAoGFaZLTnnXjIKytjmzEi+ILwJL1vj8U MEYmvkur4AS8nvQ8jnnu4CHNhHu6e8swy9H6jh/RZHdRhfQ8BF4azlvf1l3jqHQgVhHu mIidYyJLQnwYcDx4UEvaixnq5ng79CLf2JFW6p2a/qFp2LlBZeL7DTJsCMGdJsR8nCwu OXNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=IzkfJ0jDaNfh2ggGHz1IhsW1MH717j1ecV12HiOeuaU=; b=FZwMlElZ1pReUx+3UDuOKK5QYgaG11/prNM32aGlgEeOZDBvdqKZOWsiEUBaIcZQfm vdkjvU+6EwffJx1kTBCKmWkyv9S/2DcDRGRk+ZWISLiGHTKqAgeBD17kzNtLb5qH8Flz EyXpgTbZGP60hAUdQXiXHKwM4/XroA3Ru9ffAqSrVRSMYPhxTWCktYzILr11EOPG+Akz w9VsdR8NZR12aJMQDlaVvl8Vtu9tnQL2/BgcNN+w96agXDyXfWChyVbY1llJVo/c6m08 04iKIbSIyLmzzOz3fyqAxD0lk5d1I21FMkpONoZNSMKPWCkCjlwE/sNvyl0+yjDtgVyl ZoZg== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gj1si17281734pjb.64.2021.05.07.20.23.26; Fri, 07 May 2021 20:23:39 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbhEHDX5 (ORCPT + 99 others); Fri, 7 May 2021 23:23:57 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:18372 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbhEHDX4 (ORCPT ); Fri, 7 May 2021 23:23:56 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FcXdV0tY9zlc1h; Sat, 8 May 2021 11:20:46 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Sat, 8 May 2021 11:22:44 +0800 From: Zhen Lei To: Jeff Dike , Richard Weinberger , "Anton Ivanov" , Andrew Morton , Eduard-Gabriel Munteanu , linux-um , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] um: fix error return code in winch_tramp() Date: Sat, 8 May 2021 11:22:39 +0800 Message-ID: <20210508032239.2177-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 89df6bfc0405 ("uml: DEBUG_SHIRQ fixes") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- arch/um/drivers/chan_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index d8845d4aac6a..6040817c036f 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c @@ -256,7 +256,8 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out, goto out_close; } - if (os_set_fd_block(*fd_out, 0)) { + err = os_set_fd_block(*fd_out, 0); + if (err) { printk(UM_KERN_ERR "winch_tramp: failed to set thread_fd " "non-blocking.\n"); goto out_close; -- 2.25.1