summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/cyttsp4_spi.c
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2019-03-19 04:58:33 +0800
committerMarcel Holtmann <marcel@holtmann.org>2019-04-23 18:09:08 +0200
commit637c8e9013912f3161260bcaf74a184440aae363 (patch)
tree521ef661a9569b9a8879a8eb643eef8e4f7f7640 /drivers/input/touchscreen/cyttsp4_spi.c
parentafa8d3160add52e79c1d022ce22d20528d462910 (diff)
downloadblackbird-op-linux-637c8e9013912f3161260bcaf74a184440aae363.tar.gz
blackbird-op-linux-637c8e9013912f3161260bcaf74a184440aae363.zip
Bluetooth: btmtksdio: fix uninitialized symbol errors in btmtksdio_rx_packet
Fixed all the below warnings. They would probably cause the following error handling path would use the uninitialized value and then produce unexpected behavior. drivers/bluetooth/btmtksdio.c:470:2: warning: ‘old_len’ may be used uninitialized in this function [-Wmaybe-uninitialized] print_hex_dump(KERN_ERR, "err sdio rx: ", DUMP_PREFIX_NONE, 4, 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ old_data, old_len, true); ~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtksdio.c:376:15: note: ‘old_len’ was declared here unsigned int old_len; ^~~~~~~ drivers/bluetooth/btmtksdio.c:470:2: warning: ‘old_data’ may be used uninitialized in this function [-Wmaybe-uninitialized] print_hex_dump(KERN_ERR, "err sdio rx: ", DUMP_PREFIX_NONE, 4, 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ old_data, old_len, true); ~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtksdio.c:375:17: note: ‘old_data’ was declared here unsigned char *old_data; ^~~~~~~~ v2: Remove old_len and old_data because the error path for sdio_readsb also seems wrong. And change the prefix from "mediatek" to "btmtksdio". Fixes: d74eef2834b5 ("Bluetooth: mediatek: add support for MediaTek MT7663S and MT7668S SDIO devices") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp4_spi.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud