ice: add return value for functions where ICE is disabled

Add proper return value for functions defined when Inline
Crypto Driver is not enabled. This ensures any test case
calling ICE functions to fail gracefully and avoid potential
PCNOC errors.

Tests: 1. Boot sdm660 LA4.0 target with change (FBE enabled)
       2. Run create_key test-> Test fails (expected), no crash observed
       3. Reboot device -> Device booted Successfully
       4. Boot sdm660 LA.4.0 target with change (FDE enabled)
       5. Run create_key test-> Test PASSED, no crash observed
       6. Reboot device -> Device booted Successfully

Change-Id: I35e5c151d5b2860e77c092e6502e25ab1839e567
Signed-off-by: Jiten Patel <jitepate@codeaurora.org>
This commit is contained in:
Jiten Patel 2021-03-18 15:28:54 +05:30 committed by Gerrit - the friendly Code Review server
parent 423b7b2f72
commit dd588625da

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2020, 2021 The Linux Foundation. All rights reserved.
*/
#ifndef _QCOM_INLINE_CRYPTO_ENGINE_H_
@ -116,15 +116,15 @@ int qcom_ice_config_start(struct request *req,
#else
static inline int enable_ice_setup(struct ice_device *ice_dev)
{
return 0;
return -ENODEV;
}
static inline int disable_ice_setup(struct ice_device *ice_dev)
{
return 0;
return -ENODEV;
}
static inline int qcom_ice_setup_ice_hw(const char *storage_type, int enable)
{
return 0;
return -ENODEV;
}
static inline void qcom_ice_set_fde_flag(int flag) {}
static inline struct list_head *get_ice_dev_list(void)