If register number obtained from firmware is different from the
register list driver hold, an error log occurs. The incorrect
use of `&&` makes this log inaccurate, change it to `&`.

Signed-off-by: Jie Hai <haij...@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index fef904a296c0..8a6ddbfe8ccd 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -897,7 +897,7 @@ hns3_get_name_by_module(enum hns3_reg_modules module)
        size_t i;
 
        for (i = 0; i < RTE_DIM(hns3_module_name_map); i++) {
-               if (hns3_module_name_map[i].module && HNS3_MODULE_MASK(module) 
!= 0)
+               if ((hns3_module_name_map[i].module & HNS3_MODULE_MASK(module)) 
!= 0)
                        return hns3_module_name_map[i].name;
        }
        return "unknown";
-- 
2.22.0

Reply via email to