wifi: iwlwifi: mei: return error from register when not built
authorJohannes Berg <johannes.berg@intel.com>
Wed, 4 Oct 2023 09:36:26 +0000 (12:36 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 23 Oct 2023 10:21:47 +0000 (12:21 +0200)
When MEI isn't built, it seems like successfully registering
would be wrong. Change this to an error so that in the rest
of the driver, mei_registered won't be true.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20231004123422.d410a97cddfb.I7891544938d5edd5e6e7d2d99540b3637f2f1b1b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h

index 655d95d3a068a690342af186bbd7fb2e97d63459..1f3c885aeb6548246e62c604d750d66d9b398c64 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Copyright (C) 2021 - 2022 Intel Corporation
+ * Copyright (C) 2021-2023 Intel Corporation
  */
 
 #ifndef __iwl_mei_h__
@@ -493,7 +493,7 @@ static inline void iwl_mei_set_power_limit(__le16 *power_limit)
 
 static inline int iwl_mei_register(void *priv,
                                   const struct iwl_mei_ops *ops)
-{ return 0; }
+{ return -EOPNOTSUPP; }
 
 static inline void iwl_mei_start_unregister(void)
 {}