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 97A3F4C74; Mon, 23 Jun 2025 22:02:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750716144; cv=none; b=o6WlLszOBijVv/c7NIEOXWSf1+FE2wXa/aonhcytBCWu/yvbHotGTdt0n6bqYDaJQBdpfQctzb6Vg5RQcDJsTsCKeWr8lQibxqEbZ/9y24Njnb/HKw1NYacDIkKO4+Q5LLXeY0vxYP5pAy5TiBPXI+tOlMR9nVqmZRsZtXpRS2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750716144; c=relaxed/simple; bh=e4ZVeYXCfNd9euVnuAnsKdLdSKzzquo8eJ6zAJAZk5o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bFxcCp11dCtvSbZhCaeQAwDmNY9CKw1nlEAmV2+M0qiCeydq1PxEoIOO4Qhu86D4NwuWlOOYnBfO4kSRMPdrDd3+S6dkoGYHitL9yMNHDQ14IgLjem0lMU9oa8d7W0lgSImGjwKciSH38eXozR2phNIfMh4P032y5/YVDB7nbcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vVWXA6nN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vVWXA6nN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31E58C4CEEA; Mon, 23 Jun 2025 22:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750716144; bh=e4ZVeYXCfNd9euVnuAnsKdLdSKzzquo8eJ6zAJAZk5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vVWXA6nNvqaF3Wct/2UHeHXA2SHi8Hi2j/SfBjpvY07Kk+RZ7ICeNCc/VhoQO+amT +bLwVHQZn1YZ8Uekljtv+vgBj1jQ5L2lbGlMpAE+/1xy7PDSqWxzMNzdeKsiYVVz5y CTRZ5VVngT9RgsFGftRWkMpdNaNvkBICyVZ6zClg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Imre Kaloz , Andrew Lunn , Gabor Juhos , Linus Walleij , Sasha Levin Subject: [PATCH 6.12 230/414] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() Date: Mon, 23 Jun 2025 15:06:07 +0200 Message-ID: <20250623130647.787938211@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130642.015559452@linuxfoundation.org> References: <20250623130642.015559452@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gabor Juhos [ Upstream commit bfa0ff804ffa8b1246ade8be08de98c9eb19d16f ] The armada_37xx_gpio_direction_{in,out}put() functions can fail, so propagate their error values back to the stack instead of silently ignoring those. Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-5-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index c8437d45a3135..f242d24d72b8d 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -472,16 +472,17 @@ static int armada_37xx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, { struct armada_37xx_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); struct gpio_chip *chip = range->gc; + int ret; dev_dbg(info->dev, "gpio_direction for pin %u as %s-%d to %s\n", offset, range->name, offset, input ? "input" : "output"); if (input) - armada_37xx_gpio_direction_input(chip, offset); + ret = armada_37xx_gpio_direction_input(chip, offset); else - armada_37xx_gpio_direction_output(chip, offset, 0); + ret = armada_37xx_gpio_direction_output(chip, offset, 0); - return 0; + return ret; } static int armada_37xx_gpio_request_enable(struct pinctrl_dev *pctldev, -- 2.39.5