Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp483553ybl; Tue, 28 Jan 2020 06:40:03 -0800 (PST) X-Google-Smtp-Source: APXvYqz3J5+naTMMeRl0U8geccmBxJUAcm7uUazfNhjql7HzfmmGnWTCi6Ugeun8BZ4cIl0aDQZb X-Received: by 2002:a05:6830:14c9:: with SMTP id t9mr8068989otq.177.1580222403297; Tue, 28 Jan 2020 06:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580222403; cv=none; d=google.com; s=arc-20160816; b=lJBlDcpvtNb2Jgmv8qVDX/KAu8joHSdJbf+kn/PTbodw5EoCDlN5ynN6b9nrQj3zU0 FRhwsCsI+6JJTGPkaNogL3hXWGuKwayOYSzNTTrn0Yxs+mrdc5kpTSqXvAFMwKcLxCxg 4bIqdSP+exucnYa8TPY9fZw2gQLOqgk3He/jKrBvBlrgQ6/rwWa95gB63zw9WpzpPnTe uUH9QKGkRytg3TbGEPsdS4g1nQQ5Ppttjwv6mKP+y4ju60/wLNS2eVus9qGJ5Ign2LyB KAb0MSmT469qd2nPrTqzSCWwdPh50ti7vHC+hrAsSbwrEPowYPoEnW+tHt2MlzjAnqo0 F6eg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1EnjrqiIH70rcjFjU5PRy0w7Fckkuja0/xEFWpoKQ4A=; b=uhgItCjR+XrjsW2fojGAE/My7L13Wnm/3OELlkbIq7L4PxCCYIJBLy7FSuQ6LobR14 +SKtxz5pTEVZ8qu+GIPit0PLn4JoGdMDutLcS8lkmjjudC5deoX/xRw+mpb+7KrkLjtd XT+leqDUtNJ4wWOERoyDoljYVGJj4SGsHMG+DBzKoB0qUeRT0VKzUmkcNwfhFk5OsB4I 3jI418GfFwINjFdqW2UJhgK0JEESaFSICqlatyttNxm3YBNDKNvtuqkbai6q08SJR8u0 UqNBelv1CMIcbYBRDL8FRzTsVz17azJgNmW2rqV4tLDunMklQE957Xr/UgG9/JLDkuRj MByA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DZSlR0EW; 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 f17si8432204oto.85.2020.01.28.06.39.51; Tue, 28 Jan 2020 06:40:03 -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; dkim=pass header.i=@kernel.org header.s=default header.b=DZSlR0EW; 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 S1730340AbgA1OUm (ORCPT + 99 others); Tue, 28 Jan 2020 09:20:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:45584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730287AbgA1OUg (ORCPT ); Tue, 28 Jan 2020 09:20:36 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 090262071E; Tue, 28 Jan 2020 14:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221236; bh=vXdnWf+a8Kh4++JZkPQlJXJQ2jW/SqWxWckF3gR7T28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DZSlR0EWm1VV9GQ695yhgAb66xGWONmdeEWdPZK5ePgJlsceu82HisURZpMxdENcD oX/lncoJ3Tn5ohvcFcD0DCYjkgtbYOW6/tyHzwI5uEtt3aemi/m0/0dket26zaAkUf oX/lX5cQncHox8O+cNCiwv6+O1tWDb+bXWek610s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brian Masney , Pavel Machek , Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 4.9 142/271] backlight: lm3630a: Return 0 on success in update_status functions Date: Tue, 28 Jan 2020 15:04:51 +0100 Message-Id: <20200128135903.137666548@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Brian Masney [ Upstream commit d3f48ec0954c6aac736ab21c34a35d7554409112 ] lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status() both return the brightness value if the brightness was successfully updated. Writing to these attributes via sysfs would cause a 'Bad address' error to be returned. These functions should return 0 on success, so let's change it to correct that error. Fixes: 28e64a68a2ef ("backlight: lm3630: apply chip revision") Signed-off-by: Brian Masney Acked-by: Pavel Machek Acked-by: Daniel Thompson Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/video/backlight/lm3630a_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index 60d6c2ac87aa5..1771220b2437f 100644 --- a/drivers/video/backlight/lm3630a_bl.c +++ b/drivers/video/backlight/lm3630a_bl.c @@ -200,7 +200,7 @@ static int lm3630a_bank_a_update_status(struct backlight_device *bl) LM3630A_LEDA_ENABLE, LM3630A_LEDA_ENABLE); if (ret < 0) goto out_i2c_err; - return bl->props.brightness; + return 0; out_i2c_err: dev_err(pchip->dev, "i2c failed to access\n"); @@ -277,7 +277,7 @@ static int lm3630a_bank_b_update_status(struct backlight_device *bl) LM3630A_LEDB_ENABLE, LM3630A_LEDB_ENABLE); if (ret < 0) goto out_i2c_err; - return bl->props.brightness; + return 0; out_i2c_err: dev_err(pchip->dev, "i2c failed to access REG_CTRL\n"); -- 2.20.1