diff options
| author | Andrey Markovytch <andreym@codeaurora.org> | 2016-12-26 08:58:18 +0200 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-25 23:06:12 -0800 |
| commit | ebd74eee2dd802a53d583cc93ce70733f1681f35 (patch) | |
| tree | b901da3a68bae16574a0cbe68175d8a6d8e81f9d | |
| parent | 7aada1c608d39bc247ed2ac337fdcf5469092ec4 (diff) | |
ice: fix security issue with validating error in pointer
get_ice_device_from_storage_type can return error pointer which is
not NULL in case of error, this was not checked, changes fixes this.
Change-Id: I7dd8a068454a7bd250189ff9467c685af449f81b
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
| -rw-r--r-- | drivers/crypto/msm/ice.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/msm/ice.c b/drivers/crypto/msm/ice.c index 795d553f3318..027a0d0bd0b8 100644 --- a/drivers/crypto/msm/ice.c +++ b/drivers/crypto/msm/ice.c @@ -1658,6 +1658,9 @@ int qcom_ice_setup_ice_hw(const char *storage_type, int enable) struct ice_device *ice_dev = NULL; ice_dev = get_ice_device_from_storage_type(storage_type); + if (ice_dev == ERR_PTR(-EPROBE_DEFER)) + return -EPROBE_DEFER; + if (!ice_dev) return ret; |
