]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: mapphone-mdm6600: add gpiolib dependency
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Mar 2019 20:23:58 +0000 (21:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:31 +0000 (06:43 -0700)
commit03b812eade3d431166c6e7674e02f74f0a8614fc
tree5534fecbd22eb6d920e43fc149cb2e37e2a0cbe3
parentbb4b60cda1179de867897ed96d1dad4c48236df8
phy: mapphone-mdm6600: add gpiolib dependency

[ Upstream commit 208d3423ee463ab257908456f6bbca4024ab63f7 ]

gcc points out that when CONFIG_GPIOLIB is disabled,
gpiod_get_array_value_cansleep() returns 0 but fails to set its output:

drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':
drivers/phy/motorola/phy-mapphone-mdm6600.c:220:24: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]

This could be fixed more generally in gpiolib by returning a failure
code, but for this specific case, the easier workaround is to add a
gpiolib dependency.

Fixes: 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/motorola/Kconfig