pinctrl: mediatek: move bit assignment
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 28 May 2021 09:13:11 +0000 (11:13 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 28 May 2021 09:19:10 +0000 (11:19 +0200)
commit696beef77521d3e418a2780859d1522c3c39d9b5
tree0c81a27ef1579ef4754aa8a31aeda6a141c475dc
parent07d5136f9bf1fa6abe70a1f88b04c1216fbf87a2
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: 9f940d8ecf92 ("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>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c