Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3018639rwb; Mon, 15 Aug 2022 16:15:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR5CFZIKQr3GUdmtiCPTzK4XpjlDPZfmr6FyYtcjo7RFzFMsNQHqbzHCNY/+5PF81mROaZTa X-Received: by 2002:a17:907:a40f:b0:730:c4ce:631c with SMTP id sg15-20020a170907a40f00b00730c4ce631cmr11311252ejc.362.1660605328248; Mon, 15 Aug 2022 16:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605328; cv=none; d=google.com; s=arc-20160816; b=BILYVWP9wEfgFReuTcbxh4y41pH6kgpuKnsZ+NKKnu4Qby8QUFIRBQq+Jh2WPuvY1O ijCorXp1BJyr/jJyhKKZY7NOieLdsWjw+NO7muamxQl9yN6JzMV+y7d/5lJuNqJ54azh 7mvX7FmCFRgzfbmf50+GpmwSu8wDwVbKhWHMuRv+ASiYcR3hJhquSrjpu6uCL6mjtcZX vFY/WJ/BJpTItu057zweTohUC7Lc9iLKq02bRC9aC53IcecLh+0p4EcYJGNfuxQc61tL mFb6Gw2b6a4xNnOPBHbGWM5PlLeL+Q9+J/wbOQSiXi3QS2BuSHedL2T6FZdedaY7osKn WKIA== 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:dkim-signature; bh=9TfB1SWCHVFAJVh6WBnIWaD46p5qgmHz79DJYmlPmLA=; b=gR/qyV78XbbDEnzapQ7bXM1RzcF9xhnfgvU1uMmVIRnSxKl3q19wHwnoBTvUMbGBL0 6yc5ATtpqBcGi12FNpt3ECUERIB1WfUHvAHzljip7V9Ow6GZBgW67sPRDwvI/Ec5YrYg KlG9Wx6MxVuO02/hdNJR+60H1Le9kIyyvgGnq8MexhqNEKfwWsOK5Ji9RNxJ+Ob0mpnY 99NIEtDr6c8BpRmzm2HSFc5YlGx2ZbQK/wg6H5pYJhJO1oyDujeQDRyUow3On9Z6d+YQ /pI1GJS/m0n7I6Bkjzo0TYGnJv8GEyz3u4YU2XwIpYlwBbrOaOLfWVEJDuf7YxwjCDsi vQ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qw5wXIuh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd10-20020a1709069b8a00b00730bae00e15si8802658ejc.140.2022.08.15.16.15.02; Mon, 15 Aug 2022 16:15:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qw5wXIuh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347019AbiHOVZM (ORCPT + 99 others); Mon, 15 Aug 2022 17:25:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346951AbiHOVSL (ORCPT ); Mon, 15 Aug 2022 17:18:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F2E421A9; Mon, 15 Aug 2022 12:21:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 549ABB810C6; Mon, 15 Aug 2022 19:21:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A21F0C433D7; Mon, 15 Aug 2022 19:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591303; bh=bf6HyBj5q29ViznfrW5X8XfxvHhrJS90o5YD8uYC+p4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qw5wXIuhI6r9kuQTkUwTom0VfFqLuUOzDNl8kCuLoXliw7k93QN9tUbDNcmTaY+FB 1puCrkM/29Qd1bP+9epvqojZGVV2ScKh2HwsQHGzVDPNnX6LSyBM2IBZ6XF7OWaYsZ nuPcdIhEGuwgFPEZy/pVpeEP8Fm6/1RXPPvZH/M4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Andersson , Andrew Halaney , Vinod Koul , Johan Hovold , Wolfram Sang , Sasha Levin Subject: [PATCH 5.18 0502/1095] i2c: qcom-geni: Use the correct return value Date: Mon, 15 Aug 2022 19:58:21 +0200 Message-Id: <20220815180450.290148955@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Andersson [ Upstream commit b3f0ceb7c2037c6e3affd7d9c84ac5f97af7a5b5 ] The introduction of GPI support moved things around and instead of returning the result from geni_i2c_xfer() the number of messages in the request was returned, ignoring the actual result. Fix this. Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") Signed-off-by: Bjorn Andersson Reviewed-by: Andrew Halaney Reviewed-by: Vinod Koul Reviewed-by: Johan Hovold Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-qcom-geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 5b920f0fc7dd..a4eef8de054c 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -688,7 +688,7 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, pm_runtime_put_autosuspend(gi2c->se.dev); gi2c->cur = NULL; gi2c->err = 0; - return num; + return ret; } static u32 geni_i2c_func(struct i2c_adapter *adap) -- 2.35.1