Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1194197imm; Thu, 6 Sep 2018 17:38:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbAzoTr+S7dkb9q63n8BZrQLi1oovRJTUB1wY4AmclTikBBKntGsbhdq1+W/7BreIh8ORcl X-Received: by 2002:a17:902:710c:: with SMTP id a12-v6mr5470287pll.310.1536280738812; Thu, 06 Sep 2018 17:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536280738; cv=none; d=google.com; s=arc-20160816; b=Iw/VhF5ComP3JXOW3UNFnhLmCUYqDAtMy5ZjLMp+nR4WPZ/6LjqcW+m9hW+vFyAFQl HMoKa+h1r2DwaattVFVWWZ27Z+ftPnAROyzR6czj1ktvggPO/5cSBuYZTP74bX6miXep xmXMFAZnADZcoMge6fk21S5qZJjhRfZRrySLCU8CL9nhCEwIpCIrTp0AKbFHdrgCguCa XYcidVN4AfZ/F18t/oneh/FqWPGXwBz/hkyTQOEXqVRXmJViGyz+rJWvNrzqoHJ/zZMj buUvOX/tduEaM+0Hn0nz6igY6IHmuM+KBZXWNn8ilhKijetLOlRZb9+ErgDkZ/Xhvwj6 lFTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=Y2JuanaGTcZkxXtuDVYBi9k/O6nxy/KXTuAfc+3x6Jg=; b=vJGJ7hXyjqVDh4ICvSrae867nx68uHlmLRhwozeg0WWTN9udFf+HmEiv4AO+yzqRH7 rcZhKj1C1iLBtQlbQWIGnxcssLdWX/AvWpUn0UvejxAc99JLmvdP4cQ5481xnD3FmgZR BgVqwkyjnkVceIioLCuRQva0y/y59qKGzsdrVi6VC27EE35z3pLePZgX4AGa/xgQLyNZ QzSxT79nx51aPc7+lXyrAIVGC5pafaa84o2qq8qGjcVW7mH3w3mE0Dwrj8d5Rj1wP575 3YU9sspNrjYVsS5bjmdyDExK0FnA/rpIKZnTlHprgx9KXFozwzegklkT/o8Uh3K8saVp aB6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mLsLegxh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i61-v6si6423826plb.209.2018.09.06.17.38.43; Thu, 06 Sep 2018 17:38:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mLsLegxh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729141AbeIGFPF (ORCPT + 99 others); Fri, 7 Sep 2018 01:15:05 -0400 Received: from mail-eopbgr690129.outbound.protection.outlook.com ([40.107.69.129]:53565 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725926AbeIGFPE (ORCPT ); Fri, 7 Sep 2018 01:15:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y2JuanaGTcZkxXtuDVYBi9k/O6nxy/KXTuAfc+3x6Jg=; b=mLsLegxhgC5Sq3qi4KZP2Bni8P+j0FSam1137Am/FoYndYvcm4DvQqqOSFz6xcXQ6szdKXeU0VoYYdBsy/gWNvLjAx9Nt81zhVzCCio+EjBVgDa4lctvTyQe3NSJnX1HutocX9OQHp35wIyIU7xJwqLM2NdWCYnVopygi2P4o5k= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0773.namprd21.prod.outlook.com (10.173.192.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.1; Fri, 7 Sep 2018 00:36:48 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.008; Fri, 7 Sep 2018 00:36:48 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "Gustavo A. R. Silva" , "Stable@vger.kernel.org" , Jonathan Cameron , Sasha Levin Subject: [PATCH AUTOSEL 4.18 38/88] iio: sca3000: Fix missing return in switch Thread-Topic: [PATCH AUTOSEL 4.18 38/88] iio: sca3000: Fix missing return in switch Thread-Index: AQHURkLLW+7MKgk38kazXd5d9wXgGg== Date: Fri, 7 Sep 2018 00:36:20 +0000 Message-ID: <20180907003547.57567-38-alexander.levin@microsoft.com> References: <20180907003547.57567-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003547.57567-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0773;6:QfJ1pPC8HZlzEV6rfSeB2BmLrBpi6QcAhoz9HJCU7GmMAe+XX0rSiq0BjgtTh6ZLLndw+NFM98QlotCHDEg88+76VJhHz/PndrOniLoaltz648j+vNqCw0C8JQNsAkwWnyc1EOGkhkgwZUbW3eSk6O/3dh7kvr0l5oGbvv2TeJyyZsjhTqWgx4xQMxq2EWAdYRN7IYDNdd/d3J+iaDfLVmUPFu0wYbDZyMfzk6ViHi2umiDu1BX8IYWtQyX/2CfPOTXHe2VXgVr1cqaCWMCUJlXBaqQDR3LnGk9bEczBSziUEDkt6R5LhhDiiYurUo44H/chigslsLKsIJvdZr2WRoL1EEjVi3MZYFkBu+K+k8UVj5jK0jrva4yvWtc1JSr7vA9P4FVR7K+S0sTjZvY2zUoyGssOVgffgBwZCapwRL0vD8cvvUYom9bFtcs8du+b/ZwzJ/CTaCJREYt9nJpMFA==;5:JqtwXEP3ITMEVjNkwZ36QqIJZwb7u3rae+LxmArMhnPkv68yNQlxrdGQZKTsM8jcmjEoH3v4NoajOpYcAug9HwIyhvm7OeY5kG4fSaxRfjoCHJOHS+B44KHhUHYz/gig+8qZm99jWUhhVDpiTAor3+6LThbdLXEKXA6R8OHUEA4=;7:Bj3bXs0zPqzX8RBvWljhRdh4/Y9uai298lH41EX8T4+yzGUvGakityvyNheZN6XS99ZQN9CWVP3nOZYnIG3xQ4NXiEbyNKE6yesekedesYkjAfugj5MFUI8pjo2qiMs0s7/g/N2fB9HsznsHU0x4Sy4Fad7aIw5tEPZ2w47tCDLbiKOprVL1bdIxZkR7G9QRemunD2yqVGAlTyOMa+EudzKv02i/h3m26DVNwdOXGxppsMebxwHXusqsUtNlsxNV x-ms-office365-filtering-correlation-id: 830d6110-0628-4da2-1f8d-08d61459feff x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:CY4PR21MB0773; x-ms-traffictypediagnostic: CY4PR21MB0773: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(50582790962513); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231344)(944501410)(52105095)(2018427008)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699049)(76991033);SRVR:CY4PR21MB0773;BCL:0;PCL:0;RULEID:;SRVR:CY4PR21MB0773; x-forefront-prvs: 07880C4932 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(136003)(39860400002)(346002)(376002)(396003)(189003)(199004)(8676002)(5660300001)(106356001)(6436002)(25786009)(110136005)(54906003)(6506007)(105586002)(2906002)(486006)(53936002)(446003)(2616005)(476003)(4326008)(6666003)(11346002)(5250100002)(107886003)(2501003)(86612001)(97736004)(6512007)(478600001)(3846002)(72206003)(6116002)(10290500003)(76176011)(68736007)(14454004)(1076002)(66066001)(26005)(6486002)(99286004)(8936002)(36756003)(81166006)(86362001)(14444005)(256004)(102836004)(81156014)(305945005)(186003)(22452003)(2900100001)(7736002)(10090500001)(316002)(217873002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0773;H:CY4PR21MB0776.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: uA6oOu9tg4O0RVDlOxg/K3P3/UK1MwFwrA3cA+4hJewFeomPhtcvnD046vi1zSLwtJfcJzAYwdEeHSMHnAN2PPSVWfLvQvsVkGac8adBKcUDoTsEyYacG968xTIXdlExG/VFoNPptZl6ciq9Dk7hXHZIcMZOG/+WJN+rs8L0lzhVA8MU6pi13gbllX7PxGlcCKvt4MsFlHza1wa1oQw72ebDQPmobw6iRH7s3bRo2IWTfeX1z7E3RT8BZ+syq6+Br1o43Hd+UlVHsXm6BtDY/w0L78zWs7egLXqxXUUOc88ukS+w+V0RryJcJu4c9O8QL0Wq/E3iyRxBltq9eALbiX9cZowduOGyrmM8QxqZNoY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 830d6110-0628-4da2-1f8d-08d61459feff X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2018 00:36:20.4460 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0773 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Gustavo A. R. Silva" [ Upstream commit c5b974bee9d2ceae4c441ae5a01e498c2674e100 ] The IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY case is missing a return and will fall through to the default case and errorenously return -EINVAL. Fix this by adding in missing *return ret*. Fixes: 626f971b5b07 ("staging:iio:accel:sca3000 Add write support to the lo= w pass filter control") Reported-by: Jonathan Cameron Signed-off-by: Gustavo A. R. Silva Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/accel/sca3000.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c index 4dceb75e3586..4964561595f5 100644 --- a/drivers/iio/accel/sca3000.c +++ b/drivers/iio/accel/sca3000.c @@ -797,6 +797,7 @@ static int sca3000_write_raw(struct iio_dev *indio_dev, mutex_lock(&st->lock); ret =3D sca3000_write_3db_freq(st, val); mutex_unlock(&st->lock); + return ret; default: return -EINVAL; } --=20 2.17.1