Devicetree
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: robin.murphy-5wv7dgnIgG8@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [bug report] of/irq: Break out msi-map lookup (again)
Date: Wed, 15 Nov 2017 15:23:54 +0300	[thread overview]
Message-ID: <20171115122354.f6axycussmmghtbp@mwanda> (raw)

Hello Robin Murphy,

The patch 987068fcbdb7: "of/irq: Break out msi-map lookup (again)"
from Sep 12, 2016, leads to the following static checker warning:

	drivers/of/of_pci.c:375 of_pci_map_rid()
	error: we previously assumed 'id_out' could be null (see line 372)

drivers/of/of_pci.c
   371  
   372                  if (id_out)
                            ^^^^^^
Check for NULL

   373                          *id_out = masked_rid - rid_base + out_base;
   374  
   375                  pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n",
   376                          np, map_name, map_mask, rid_base, out_base,
   377                          rid_len, rid, *id_out);
                                               ^^^^^^
Unchecked dereference

   378                  return 0;

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2017-11-15 12:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171115122354.f6axycussmmghtbp@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox