Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp36016pxu; Thu, 10 Dec 2020 17:29:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKwSGFJSKl0IZEdNnRjUa0kvBfmaf/eN6ba1AuO9GhP+a6bUEITbvK6aqCsBC1RIPWBSDT X-Received: by 2002:a17:906:814a:: with SMTP id z10mr8680383ejw.96.1607650142964; Thu, 10 Dec 2020 17:29:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607650142; cv=none; d=google.com; s=arc-20160816; b=ry757oqrt3ARqpcFqtfB3sbodkeNslHHloR6+jl27inApjFVeTQLev3uVYkeHwnQPP TiS4tbzMJWA136iuBI0tmOW5opEeMHQ5NGFCpxZYRFJiO3irMtMMQ4coUCf/LRQU55Ee 9hVvNN0Eg+2iTf5eCvscUtSD+mquokpK5NdEdJz8IIoXWoZC7eryhYYmQ2BaXMIsHvkt NrvPU7ofvPynHeTKui/IUp8xODXbFlVSWuy7F2ogsa/wR/86lWfulGwzclmQocUEV1pc dYgSxVKZoj3we/WfDYYvK3cx3P7LZBaZI5OBi1hNpeBekCkF1xCIbo9nhapRG+XGxQbb fCEA== 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=MgUJve5YXEirpdObwRtJZraLd3z8iVxL8ObZZ3ep6cA=; b=xWu771ndzDLx/dHECySTWV5nYFZsZFcWQ/c/Iz+B13sawvuShjcXkeQOJi4lH7y479 23uSCo+rK99jqHs1vNa5GyBwCU2+Savkz2yuaFLxDNsY2T9gv3sn6c5Ut6+GeHy5mzUP C0VEuADfuPN75jbMD0Lzd4/z44ZgI1yjRJTe9oXTEcz+G8dmpJ90Lckd+dZrjTuxanGx ELH5FR83t9UXxj8FnJM3itvFAaC6ZAQ5eN5v/EGuTltw2WQG7pmE7Xe+gwZK4NO7Mk5O WeMlh7hpRG8W0lyvf+hKKzBoTAa7vnd6X/99v2HGyedIK77ZBynEcYQbJ6n3Y8CzLZuW S4Dg== 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 dn5si3993948ejc.533.2020.12.10.17.28.40; Thu, 10 Dec 2020 17:29:02 -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 S2390718AbgLJOcz (ORCPT + 99 others); Thu, 10 Dec 2020 09:32:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:39850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390554AbgLJOcU (ORCPT ); Thu, 10 Dec 2020 09:32:20 -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.14 29/31] i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc() Date: Thu, 10 Dec 2020 15:27:06 +0100 Message-Id: <20201210142603.551944230@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142602.099683598@linuxfoundation.org> References: <20201210142602.099683598@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 @@ -846,7 +846,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; }