mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
pinctrl: mediatek: move bit assignment
The bit needs offset to be defined which happens some lines
below. Looks like a bug. The kernel test robot complains:
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:137:12:
warning: variable 'offset' is uninitialized when used here [-Wuninitialized]
bit = BIT(offset & pctl->devdata->mode_mask);
^~~~~~
Fix it up by reverting to what was done before.
Cc: Fabien Parent <fparent@baylibre.com>
Cc: Sean Wang <sean.wang@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Cc: linux-mediatek@lists.infradead.org
Fixes: 9f940d8ecf
("pinctrl: mediatek: don't hardcode mode encoding in common code")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
07d5136f9b
commit
696beef775
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ static int mtk_pconf_set_ies_smt(struct mtk_pinctrl *pctl, unsigned pin,
|
|||
pin, pctl->devdata->port_align, value, arg);
|
||||
}
|
||||
|
||||
bit = BIT(offset & pctl->devdata->mode_mask);
|
||||
bit = BIT(pin & 0xf);
|
||||
|
||||
if (arg == PIN_CONFIG_INPUT_ENABLE)
|
||||
offset = pctl->devdata->ies_offset;
|
||||
|
|
Loading…
Reference in a new issue