diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-05-10 10:58:32 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2019-07-04 12:10:55 +0200 |
commit | a71dcd3757e29cc8b43383ff18595d707cf08345 (patch) | |
tree | b214062fd64dc92d0179d6d69a6d577835b5761c /include | |
parent | a188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff) |
reset: remove redundant null check on pointer dev
Pointer dev is being dereferenced when passed to the inlined
functon dev_name, however, dev is later being null checked
so at first this seems like a potential null pointer dereference.
In fact, _reset_control_get_from_lookup is only ever called from
__reset_control_get, right after checking dev->of_node hence
dev can never be null. Clean this up by removing the redundant
null check.
Thanks to Philipp Zabel for spotting that dev can never be null.
Addresses-Coverity: ("Dereference before null check")
Fixes: 6691dffab0ab ("reset: add support for non-DT systems")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions