Skip to content
Commit 0c7ab953 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

wifi: plfxlc: remove redundant NULL-check for GCC 12



GCC is upset that we check the return value of plfxlc_usb_dev()
even tho it can't be NULL:

drivers/net/wireless/purelifi/plfxlc/usb.c: In function ‘resume’:
drivers/net/wireless/purelifi/plfxlc/usb.c:840:20: warning: the comparison will always evaluate as ‘true’ for the address of ‘dev’ will never be NULL [-Waddress]
  840 |         if (!pl || !plfxlc_usb_dev(pl))
      |                    ^

plfxlc_usb_dev() returns an address of one of the members of pl,
so it's safe to drop these checks.

Acked-by: default avatarKalle Valo <kvalo@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 17155d5d
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