From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31E596FB5 for ; Sun, 17 Sep 2023 20:30:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FEB4C433C7; Sun, 17 Sep 2023 20:30:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694982653; bh=7TxjRhG/y7uXs0Aby01cf1RSyEDjqbku1mbwETcVvq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JTFmFFX0701dRH3mif7SdI+2en++9DSOYAvhVppSamWMhfxq0IDn0kR84B+Xebiep r669Rlo5OVzZxyjJMNHc+RJiyDHxbQBqUCiKwcCIV/xDJQQinHHlUfqHXJbZ1ubdWv LgSFKeSzev+d7BSj4ASj3GEV5/OU3PYPbHp0Eck4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dan Carpenter , Andy Shevchenko , Lee Jones , Sasha Levin Subject: [PATCH 5.15 306/511] leds: pwm: Fix error code in led_pwm_create_fwnode() Date: Sun, 17 Sep 2023 21:12:13 +0200 Message-ID: <20230917191121.218311723@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191113.831992765@linuxfoundation.org> References: <20230917191113.831992765@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter [ Upstream commit cadb2de2a7fd9e955381307de3eddfcc386c208e ] Negative -EINVAL was intended, not positive EINVAL. Fix it. Fixes: 95138e01275e ("leds: pwm: Make error handling more robust") Signed-off-by: Dan Carpenter Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/leds/leds-pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index 6832180c1c54f..cc892ecd52408 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -146,7 +146,7 @@ static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv) led.name = to_of_node(fwnode)->name; if (!led.name) { - ret = EINVAL; + ret = -EINVAL; goto err_child_out; } -- 2.40.1