Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp391527ybv; Fri, 7 Feb 2020 01:13:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwX3SoO7NmMKkXDIKEulUpevpzPVt8MDZonwL3GXG8sEQicKPJehCWKayHUOXWNNtm/rvrX X-Received: by 2002:aca:100e:: with SMTP id 14mr1443271oiq.88.1581066801115; Fri, 07 Feb 2020 01:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581066801; cv=none; d=google.com; s=arc-20160816; b=mUcqNpSOBtAZi+zUzJkPPAAvfRcibgsij4urYrLrysuByxVS6iDE6bUyjpVVqxGiwd wHrlKmL3xUnL3ByZAdaJgQubsByVVjO8ni7ofpFCsnRZYJgo0pBka9rPMMqjBgZ4WU9o Kxe5hF5n2XR7F04igLc+DUOn0qF0viru0/CM6KyU9vIUp27H2fT9FkvLBiqaH0xbC8Ro BW1ghtUHlrjkRTpdADNq58df2RGuV/9YCwINwjfhY2jHsqiK0v7Y3/WTY2AsNJk1+aZ5 2FhutufwHpaZjByzFW7PPFtNhEVATzxZAgaaQolYmO7Qc9flq/fw/J9fKCbd5rhjqz1I IzXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=K97ruyI0CCBOcxJxjCPs0UHyamDbhwxkDTbc25uigbU=; b=vKtp7/r5bCI+tNQq+dzd4DWEzkE1LVFF+CMBwaaQXvfpN98B5trnykFrbytqcYQrIO ky6lE/6qgaiq8R7e/pebcHtuvY+dGQIEA8ly7qCBI62AbOQQ8fq+KzoSZCAaXYBBOI6y qf3yuCL+6jTN5raYhUcwNU0ujmQfu9wI/dCiCUjpEFzCjSoVWrJXidoAQ6PBVddG92BX 8XIVNevS4iPuYpwuuU6uCc5yebTmTPRC9fDGEvZlADoCETkNydb9IYXd4dUsdY9XxEnD QpJHGP+7L2flUKbT847F2A5J2bwyjDfGw2Wzyhwm+zRFoRKgaY6yi2jCy2uxenarxzdO wfpQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e64si3679132oib.4.2020.02.07.01.13.07; Fri, 07 Feb 2020 01:13:21 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726843AbgBGJMO (ORCPT + 99 others); Fri, 7 Feb 2020 04:12:14 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:47094 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbgBGJMO (ORCPT ); Fri, 7 Feb 2020 04:12:14 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id A9ABDFB03; Fri, 7 Feb 2020 10:12:11 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UkTU13E4jSmg; Fri, 7 Feb 2020 10:12:10 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id F13AA40756; Fri, 7 Feb 2020 10:12:09 +0100 (CET) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Tomas Novotny , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , "Angus Ainslie (Purism)" , =?UTF-8?q?Guido=20G=C3=BCnther?= , Marco Felsch , Thomas Gleixner , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: vncl4000: Fix early return in vcnl4200_set_power_state Date: Fri, 7 Feb 2020 10:12:09 +0100 Message-Id: <19efdcd597b21ece9ad0ff894b6566d2ef4e2c02.1581066317.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't return early unconditionally. Signed-off-by: Guido Günther Reported-by: kbuild test robot Reported-by: Dan Carpenter --- I've not added a 'Fixes:' line since this is not part of Linus tree yet. Tested proximity and ambient light on a vcnl4040 and checked the driver suspends/resumes correctly and puts out valid data right after resume. drivers/iio/light/vcnl4000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index 3b71c7d538af..38fcd9a26046 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -149,7 +149,7 @@ static int vcnl4200_set_power_state(struct vcnl4000_data *data, bool on) if (ret < 0) return ret; - return i2c_smbus_write_word_data(data->client, VCNL4200_PS_CONF1, val); + ret = i2c_smbus_write_word_data(data->client, VCNL4200_PS_CONF1, val); if (ret < 0) return ret; -- 2.23.0