diff mbox series

[2/2] iwlwifi: fix DVM boot regression in 5.12-rc

Message ID alpine.LSU.2.11.2103061147270.1285@eggly.anvils
State New
Headers show
Series None | expand

Commit Message

Hugh Dickins March 6, 2021, 7:49 p.m. UTC
No time_point op has been provided for DVM: check for NULL before
calling, to fix the oops (blank screen booting non-modular kernel).

Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
Signed-off-by: Hugh Dickins <hughd@google.com>
---

 drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sedat Dilek March 6, 2021, 7:53 p.m. UTC | #1
On Sat, Mar 6, 2021 at 8:50 PM Hugh Dickins <hughd@google.com> wrote:
>
> No time_point op has been provided for DVM: check for NULL before
> calling, to fix the oops (blank screen booting non-modular kernel).
>
> Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
> Signed-off-by: Hugh Dickins <hughd@google.com>

See "iwlwifi: avoid crash on unsupported debug collection" in [1].

- Sedat -

[1] https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git/commit/?id=4538c5ed0f7e892f1b643472e48146757d1e60c5

> ---
>
>  drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- 5.12-rc2/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h   2021-02-28 16:58:55.058425551 -0800
> +++ linux/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h      2021-03-05 20:59:14.156217412 -0800
> @@ -205,7 +205,8 @@ static inline void iwl_op_mode_time_poin
>                                           enum iwl_fw_ini_time_point tp_id,
>                                           union iwl_dbg_tlv_tp_data *tp_data)
>  {
> -       op_mode->ops->time_point(op_mode, tp_id, tp_data);
> +       if (op_mode->ops->time_point)
> +               op_mode->ops->time_point(op_mode, tp_id, tp_data);
>  }
>
>  #endif /* __iwl_op_mode_h__ */
diff mbox series

Patch

--- 5.12-rc2/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h	2021-02-28 16:58:55.058425551 -0800
+++ linux/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h	2021-03-05 20:59:14.156217412 -0800
@@ -205,7 +205,8 @@  static inline void iwl_op_mode_time_poin
 					  enum iwl_fw_ini_time_point tp_id,
 					  union iwl_dbg_tlv_tp_data *tp_data)
 {
-	op_mode->ops->time_point(op_mode, tp_id, tp_data);
+	if (op_mode->ops->time_point)
+		op_mode->ops->time_point(op_mode, tp_id, tp_data);
 }
 
 #endif /* __iwl_op_mode_h__ */