Skip to content
Commit 696beef7 authored by Linus Walleij's avatar Linus Walleij
Browse files

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: 9f940d8e

 ("pinctrl: mediatek: don't hardcode mode encoding in common code")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 07d5136f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment