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 CF8B21E22E6; Mon, 23 Jun 2025 21:39:39 +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=1750714779; cv=none; b=ALF3Jl1t1lZPKvtivUlxVreyx0o5P9zbHL6+6he1NuF2c0MRJazUILZWrPeRG2/eExMgeHeMVdX7xYFd55Ie3XtN5DjK/Onxb0GfhVE0NW3/qn/HR7QDS3PVXUslJT6kIJvTI/Sc4KvFoeL80XuONndYwFrauZ+5w980pjhts9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714779; c=relaxed/simple; bh=fQp8FaG/3YPhpiZxT8A+h6W5DvsPNaCBxO0VE8JhQo4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ild2Lv9vHY5FKsouoJjrNdaXgJb3u5F85Jc4Ljt8XfyujIvE7SEoTJpGO8iqumL1UtvB+doNH2Kci/5JjHenltP/cBYlz/8KciasQz4gYsjS74G+2FGiG6JLYIVQ18coZUreyvA5WkJ1F0kQ9vTdszyD0ozZuRB8q94VbTwCdhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nDRcFf4J; 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="nDRcFf4J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FE5BC4CEEA; Mon, 23 Jun 2025 21:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750714779; bh=fQp8FaG/3YPhpiZxT8A+h6W5DvsPNaCBxO0VE8JhQo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nDRcFf4J1e2HPZGW7at8tPVEui0hLNSXOawGt6RgV/+izumsDhdR2a/6r/gYMK3pL wF9NyuQmF2IGxBRK5lcmsVbrLk1oKlEp4GaLC1HKUOUa+xmDUhlIuJJ9M750TYdV2+ mf6PwLS/7R5q9k5dnLuA/QgtYN0Zy0jerVmE3n9M= 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.6 158/290] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() Date: Mon, 23 Jun 2025 15:06:59 +0200 Message-ID: <20250623130631.646566163@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130626.910356556@linuxfoundation.org> References: <20250623130626.910356556@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.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gabor Juhos [ Upstream commit 6481c0a83367b0672951ccc876fbae7ee37b594b ] The regmap_read() function can fail, so propagate its error up to the stack instead of silently ignoring that. Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-6-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index 1d9aa4e76a23b..8008bad481b7d 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -400,10 +400,13 @@ static int armada_37xx_gpio_get_direction(struct gpio_chip *chip, struct armada_37xx_pinctrl *info = gpiochip_get_data(chip); unsigned int reg = OUTPUT_EN; unsigned int val, mask; + int ret; armada_37xx_update_reg(®, &offset); mask = BIT(offset); - regmap_read(info->regmap, reg, &val); + ret = regmap_read(info->regmap, reg, &val); + if (ret) + return ret; if (val & mask) return GPIO_LINE_DIRECTION_OUT; -- 2.39.5