From: Ivan Abramov Date: Wed, 5 Mar 2025 09:25:20 +0000 (+0300) Subject: ptp: ocp: Remove redundant check in _signal_summary_show X-Git-Tag: io_uring-6.15-20250403~82^2~161 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=cd02ab73664dbf08dd5af8c9d3a97e8b6eb75dfc;p=linux-block.git ptp: ocp: Remove redundant check in _signal_summary_show 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 Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250305092520.25817-1-i.abramov@mt-integration.ru Signed-off-by: Jakub Kicinski --- diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index b651087f426f..34c616bd0a02 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -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",