Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp151596pxu; Thu, 10 Dec 2020 21:48:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqagc3UB22MKu+wo3mpuiZdZ1BX2Gtj5DtWYy5bCJPuj57YmW36Tx40qqRWCdDkT/e7oSg X-Received: by 2002:a17:906:cc84:: with SMTP id oq4mr9623959ejb.513.1607665731744; Thu, 10 Dec 2020 21:48:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607665731; cv=none; d=google.com; s=arc-20160816; b=mozBidHk0WWG6PNeuMvmSreIMYoH9p4i3DyBhJ5odDJ3QodvUzgjxtUUWNWS1siUPe eW3DOHLZu/oldawAzIVq66cjZYrLc4e0NkyGcNOSxVIUHblEKnZB9O/+UBSSvS6jekSO 4luBCh4067HyLOpda4rknl6Hi8CULcZVhjsJeRrwtaXOpKNETS+1u16KVXZUYemNngjX dtMLTWPOama9KKho3SuXGVXRfw6QCWGRGpYvv6YyDZXUvAEAK+UlUdigVzD4ovkl77uu bMMqdD7FWX868vjklttybAyXwtgtsb0mCy8Mkr9aE3YRfWPOG1yJyuq7Cc3R0gfShYps nHhg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=nJKn2Q//a5l27moJhHUzzAiH7vC7XuBXGCNVvjiduzk=; b=cKBkz76xGWIu7XtzHj8W0oaGHKIBhGYtrgyIS7dOSDb0RZ56F1zxi1aDePvRL47iyS JD33oWUGquSv0gkkoonzWKszu3UK80wgbU2Lxvg7QnuZZR9A2LA6CgLllqoC65iKcWWA 9zPnJpskfGDRYSQlrIaR8YuZqiUgLFvV5NqgZl5ajw/+I42npM9T2asVWmZGB93SGIFI u32pp0V5dJ4BxJ84Fd7Wdf5YypIr0qe7jf75ulqCrH7FCZNZz600QGBqwBgXHPksN57H F2H2K9m6HPtfL0dm1/w1d0nqnsam+XjrO0+JKrNnOAL+wdTwghmgnYNY+dTkW29M2bsJ qOOg== 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa7si4409595ejb.706.2020.12.10.21.48.28; Thu, 10 Dec 2020 21:48:51 -0800 (PST) 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390571AbgLJOcj (ORCPT + 99 others); Thu, 10 Dec 2020 09:32:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:38778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388474AbgLJOau (ORCPT ); Thu, 10 Dec 2020 09:30:50 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhihao Cheng , Bjorn Andersson , Wolfram Sang Subject: [PATCH 4.9 43/45] i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc() Date: Thu, 10 Dec 2020 15:26:57 +0100 Message-Id: <20201210142604.460327484@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142602.361598591@linuxfoundation.org> References: <20201210142602.361598591@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhihao Cheng commit e9acf0298c664f825e6f1158f2a97341bf9e03ca upstream. Fix to return the error code from qup_i2c_change_state() instaed of 0 in qup_i2c_bam_schedule_desc(). Fixes: fbf9921f8b35d9b2 ("i2c: qup: Fix error handling") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Reviewed-by: Bjorn Andersson Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/i2c-qup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -810,7 +810,8 @@ static int qup_i2c_bam_do_xfer(struct qu if (ret || qup->bus_err || qup->qup_err) { reinit_completion(&qup->xfer); - if (qup_i2c_change_state(qup, QUP_RUN_STATE)) { + ret = qup_i2c_change_state(qup, QUP_RUN_STATE); + if (ret) { dev_err(qup->dev, "change to run state timed out"); goto desc_err; }