Skip to content
Commit c8a3b9b5 authored by Joel Stanley's avatar Joel Stanley
Browse files

soc: aspeed: lpc-ctrl: Fix probe error handling



gcc warns that a mising "flash" phandle node leads to undefined
behavior later:

drivers/soc/aspeed/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_probe':
drivers/soc/aspeed/aspeed-lpc-ctrl.c:201:18: error: '*((void *)&resm+8)' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Only set the flash base and size if we find a phandle in the device
tree.

Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarAndrew Jeffery <andrew@aj.id.au>
Reviewed-by: default avatarVijay Khemka <vijaykhemka@fb.com>
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
parent e4272af4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment