From dd588625da4ff03f9d3583e4c376c4ec7623e21f Mon Sep 17 00:00:00 2001 From: Jiten Patel Date: Thu, 18 Mar 2021 15:28:54 +0530 Subject: [PATCH] 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 --- include/crypto/ice.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/crypto/ice.h b/include/crypto/ice.h index 907bbd46a433..f5b310199a5c 100644 --- a/include/crypto/ice.h +++ b/include/crypto/ice.h @@ -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)