Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4391260ybf; Wed, 4 Mar 2020 03:04:01 -0800 (PST) X-Google-Smtp-Source: ADFU+vvwNcXPoJDvj8tg5qFcKJZWEMmR+97a/NInV4Irh/2Uuc+AUFD+fzXV01xzHc4XOfwjcHBX X-Received: by 2002:a9d:12a8:: with SMTP id g37mr1935099otg.160.1583319841212; Wed, 04 Mar 2020 03:04:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583319841; cv=none; d=google.com; s=arc-20160816; b=zOIJnN5qVnN/zOrxavIVQGfNHAQJ27/gA+5mxKfTPwE7J6ulZ3R1QK66U1eGjTBj65 yjMeTyh2CS5mqSSEauMlHChiSANt9wRf62CA1i60Mks14sIn3HEfmRyxfU6npF1IfosX fSjvMfMZQrsmIfIP7Zacv6Swr0ogzG+KSyi6I3iyyrbbctZAjZeaqEu4T2zmnPo25GAD FOBc0EJxO6pNz4vnnvPo9jbjuo33V2+jS5aG1TLA6F0YJg5TQ2XUeCtEmj632tHX3jZn +XcmDu0NUJGynbH3M4NTeR5RsXrY8XODUhN8Q1WJQwWI73X/2T/hC0nllm3kphszI0zV l7sA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=tVilvENqsvn7Qh9dmsLhsCnAEgqVkXeC8XfJFOY7DJA=; b=TBU6DyIINv953d2f/APomqAQgTzosxO/VviWnsjOro9uCnvkEiJYH0L4Khq17Kn74E F3Zw7YNo42BMZ/88F1bOqwHy13sT4ZrAjLXcwlmnGqW3fz1/cncQqxJsxpIMqt3wbE5V rUEVcIv9fZgWoM61smzJug55p4ZzpMyvmw8jf/ouSBJxV6DMQNDO1ZrIye6EwXANjcqI zOLVMLHPntaN16Fmym41NwBzJwan/+vKvQHsAX3wrqC8OypkubuXfGKD+TUqMD0kcF6k 8l6+7VJ5bs7Yezz64RBvl9ZO3WejOZdlrlwIWn42V28w1FPhwWH5me87Z1Xuv+oJkYLJ XvSg== 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 h125si870009oia.253.2020.03.04.03.03.49; Wed, 04 Mar 2020 03:04:01 -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 S2387910AbgCDLCm (ORCPT + 99 others); Wed, 4 Mar 2020 06:02:42 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:44526 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729118AbgCDLCm (ORCPT ); Wed, 4 Mar 2020 06:02:42 -0500 Received: from 79.184.237.41.ipv4.supernova.orange.pl (79.184.237.41) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.341) id 9e78e012dbbd93a1; Wed, 4 Mar 2020 12:02:39 +0100 From: "Rafael J. Wysocki" To: Colin King Cc: Zhang Rui , Len Brown , linux-acpi@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ACPI: video: remove redundant assignments to variable result Date: Wed, 04 Mar 2020 12:02:39 +0100 Message-ID: <1811882.qudN6vFfLL@kreacher> In-Reply-To: <20200229001243.113176-1-colin.king@canonical.com> References: <20200229001243.113176-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, February 29, 2020 1:12:43 AM CET Colin King wrote: > From: Colin Ian King > > The variable result is being initialized with a value that is never > read and it is being updated later with a new value. The initialization > is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- > drivers/acpi/acpi_video.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c > index 15c5b272e698..bc96457c9e25 100644 > --- a/drivers/acpi/acpi_video.c > +++ b/drivers/acpi/acpi_video.c > @@ -943,7 +943,7 @@ acpi_video_init_brightness(struct acpi_video_device *device) > int i, max_level = 0; > unsigned long long level, level_old; > struct acpi_video_device_brightness *br = NULL; > - int result = -EINVAL; > + int result; > > result = acpi_video_get_levels(device->dev, &br, &max_level); > if (result) > Applied as 5.7 material, thanks!