From: Florian Weimer <[email protected]>

kernel/rh_messages.c: Another gcc12 warning on redundant NULL test

Upstream Status: RHEL only
Bugzilla: https://bugzilla.redhat.com/2216678

Commit f27fc648898bdba50204e9d6eb34cecd ("kernel/rh_messages.c:
gcc12 warning on redundant NULL test") missed the mod->name check
added in commit 5d3565f9ffcb927868fc7baf1bf37707f934bdc("Add Partner
Supported taint flag").


Signed-off-by: Florian Weimer <[email protected]>

diff --git a/kernel/rh_messages.c b/kernel/rh_messages.c
index blahblah..blahblah 100644
--- a/kernel/rh_messages.c
+++ b/kernel/rh_messages.c
@@ -193,7 +193,7 @@ void mark_partner_supported(const char *msg, struct module 
*mod)
        if (msg)
                str = msg;
 #ifdef CONFIG_MODULES
-       else if (mod && mod->name)
+       else if (mod)
                str = mod->name;
 #endif
 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2527
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to