Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp886633rdb; Fri, 20 Oct 2023 02:15:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSPXEj+r49wnoKvVhPevV/b+SKnvTSR5yCwPIeZlsV/FTtzSqUdwWLxRnQJpqzW17UxToQ X-Received: by 2002:a17:90a:a413:b0:277:68c3:64b9 with SMTP id y19-20020a17090aa41300b0027768c364b9mr6363023pjp.5.1697793308513; Fri, 20 Oct 2023 02:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697793308; cv=none; d=google.com; s=arc-20160816; b=QMx1j1VmDqJmqC+cJ0npGLIZWb8QAS7rcQjqhPT/IO2FH1ast70yRTmI+Tj+aHI7Dh MsJf11pVsHk6oP0JsczQMzGv1iyy9Z3t922vy4/hgEYC7hIxO7Hv1e7HpTfum4eg05NJ qy/r2QAhKSTHbSI38qwa/W6HuQLTuXRJW6SENg7T+8VTU9tRmaVhIOKGdIQ3RVZYW0rO jFXfPuFXnsX7wDaplSY2eaAIaaxXFczZdIiKw2RfFNuuP1LaG6udeToxMat3StytrbCs i/CNaRFqM5hAUuUowidud2u08buMyGcA5W1rhQ6Ch/GEsfKZacRNryEo6maUJj0k8IY6 +/1g== 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 :in-reply-to:message-id:date:subject:cc:to:from; bh=RD3v62vQUgStZnX/iBMrPaflgrFeVpk9K3McOzE6xHM=; fh=tdN0gxRbNmj8gni2xpkpQRlD8wL7eIfsGcQFLKXU0k4=; b=Bxu+fS/UgDlL07x3/Gn2WDiwm3lLCBaSjTSih0URzj9rs4o3eeKXIPc0RuvABIrTCk HXpVuAcsvc06gfXUpLEp2BvchFraVCR0dC3puDW426zLOSasgFK78jSeFRLM8x08HaWe 0e8NIvPJj3cpF790o5xD/w0A1/Epzxln13Io+jui/Ka3rI24fqndS2g0TyoO2d0Xb1m/ PM4e4g7emBDzhcb6Woczy2PUEgJHadob9KykMW2MrGknqNG8N+zC6iE14zkXSLTEoV91 etRPmw8yxdirG3QucouD7wPwTv+a8geYJGw8W6MSSKKpwUdpnt/OQPoY97lYgGCaRuGS /2jQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id i4-20020a17090acf8400b0027d0bf1eef1si1573985pju.98.2023.10.20.02.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:15:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8385F81C1782; Fri, 20 Oct 2023 02:15:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376621AbjJTJO6 (ORCPT + 99 others); Fri, 20 Oct 2023 05:14:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376523AbjJTJO5 (ORCPT ); Fri, 20 Oct 2023 05:14:57 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 76C14106; Fri, 20 Oct 2023 02:14:54 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id B65A26024D8BF; Fri, 20 Oct 2023 17:14:36 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: jic23@kernel.org, lars@metafoo.de Cc: Su Hui , jean-baptiste.maneyrol@tdk.com, chenhuiz@axis.com, andy.shevchenko@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] phy: mapphone-mdm6600: fix an error code problem in inv_mpu6050_read_raw Date: Fri, 20 Oct 2023 17:14:14 +0800 Message-Id: <20231020091413.205743-2-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231020091413.205743-1-suhui@nfschina.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 20 Oct 2023 02:15:04 -0700 (PDT) inv_mpu6050_sensor_show() can return -EINVAL or IIO_VAL_INT. Return the true value rather than only return IIO_VAL_INT. Signed-off-by: Su Hui --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 29f906c884bd..a9a5fb266ef1 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -749,13 +749,13 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev, ret = inv_mpu6050_sensor_show(st, st->reg->gyro_offset, chan->channel2, val); mutex_unlock(&st->lock); - return IIO_VAL_INT; + return ret; case IIO_ACCEL: mutex_lock(&st->lock); ret = inv_mpu6050_sensor_show(st, st->reg->accl_offset, chan->channel2, val); mutex_unlock(&st->lock); - return IIO_VAL_INT; + return ret; default: return -EINVAL; -- 2.30.2