ptp: ocp: Remove redundant check in _signal_summary_show
authorIvan Abramov <i.abramov@mt-integration.ru>
Wed, 5 Mar 2025 09:25:20 +0000 (12:25 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Mar 2025 23:31:33 +0000 (15:31 -0800)
In the function _signal_summary_show(), there is a NULL-check for
&bp->signal[nr], which cannot actually be NULL.

Therefore, this redundant check can be removed.

Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20250305092520.25817-1-i.abramov@mt-integration.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/ptp/ptp_ocp.c

index b651087f426f50a73229ca57634fc5d6912e0a87..34c616bd0a02f65aadbe88c49417f3cb7c601a8b 100644 (file)
@@ -3959,9 +3959,6 @@ _signal_summary_show(struct seq_file *s, struct ptp_ocp *bp, int nr)
        bool on;
        u32 val;
 
-       if (!signal)
-               return;
-
        on = signal->running;
        sprintf(label, "GEN%d", nr + 1);
        seq_printf(s, "%7s: %s, period:%llu duty:%d%% phase:%llu pol:%d",