Skip to content

Commit b7c0982

Browse files
Chen Nimiquelraynal
authored andcommitted
mtd: physmap_of_gemini: Fix disabled pinctrl state check
The condition for checking the disabled pinctrl state incorrectly checks gf->enabled_state instead of gf->disabled_state. This causes misleading error messages and could lead to incorrect behavior when only one of the pinctrl states is defined. Fix the condition to properly check gf->disabled_state. Fixes: 9d3b508 ("mtd: physmap_of_gemini: Handle pin control") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent 16d68d1 commit b7c0982

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/maps/physmap-gemini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ int of_flash_probe_gemini(struct platform_device *pdev,
181181
dev_err(dev, "no enabled pin control state\n");
182182

183183
gf->disabled_state = pinctrl_lookup_state(gf->p, "disabled");
184-
if (IS_ERR(gf->enabled_state)) {
184+
if (IS_ERR(gf->disabled_state)) {
185185
dev_err(dev, "no disabled pin control state\n");
186186
} else {
187187
ret = pinctrl_select_state(gf->p, gf->disabled_state);

0 commit comments

Comments
 (0)