author | Suman Anna <s-anna@ti.com> | |
Wed, 18 Dec 2019 22:30:15 +0000 (16:30 -0600) | ||
committer | Suman Anna <s-anna@ti.com> | |
Wed, 18 Dec 2019 22:30:15 +0000 (16:30 -0600) | ||
commit | d9b216e87f43be506c3f6863509623148e5c54c8 | |
tree | acc1148093d4240558750766aee1bd4913145763 | tree | snapshot (tar.xz tar.gz zip) |
parent | 70d3146d9336e541c5ad6b2d03918e59482c5c35 | commit | diff |
rpmsg: rpc: fix static checker errors
Fix couple of minor issues reported by the Klocwork static checker
analysis tool:
- Perform a sanity check on the function index against the available
number of functions supported by the rppc device to avoid out-of-bound
array access in rppc_write().
- Remove a stale local variable redefinition to avoid returning an
uninitialized return value in certain paths in rppc_probe().
Fixes: 1b5a3b2ef344 ("rpmsg: rpc: introduce a new rpmsg_rpc driver")
Signed-off-by: Suman Anna <s-anna@ti.com>
Fix couple of minor issues reported by the Klocwork static checker
analysis tool:
- Perform a sanity check on the function index against the available
number of functions supported by the rppc device to avoid out-of-bound
array access in rppc_write().
- Remove a stale local variable redefinition to avoid returning an
uninitialized return value in certain paths in rppc_probe().
Fixes: 1b5a3b2ef344 ("rpmsg: rpc: introduce a new rpmsg_rpc driver")
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/rpmsg/rpmsg_rpc.c | diff | blob | history |