Commit 470efd68 authored by Daniil Tatianin's avatar Daniil Tatianin Committed by Jakub Kicinski

qed/qed_mng_tlv: correctly zero out ->min instead of ->hour

This fixes an issue where ->hour would erroneously get zeroed out
instead of ->min because of a bad copy paste.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Fixes: f240b688 ("qed: Add support for processing fcoe tlv request.")
Signed-off-by: default avatarDaniil Tatianin <d-tatianin@yandex-team.ru>
Link: https://lore.kernel.org/r/20230315194618.579286-1-d-tatianin@yandex-team.ruSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 24994513
...@@ -422,7 +422,7 @@ qed_mfw_get_tlv_time_value(struct qed_mfw_tlv_time *p_time, ...@@ -422,7 +422,7 @@ qed_mfw_get_tlv_time_value(struct qed_mfw_tlv_time *p_time,
if (p_time->hour > 23) if (p_time->hour > 23)
p_time->hour = 0; p_time->hour = 0;
if (p_time->min > 59) if (p_time->min > 59)
p_time->hour = 0; p_time->min = 0;
if (p_time->msec > 999) if (p_time->msec > 999)
p_time->msec = 0; p_time->msec = 0;
if (p_time->usec > 999) if (p_time->usec > 999)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment