All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <jroedel@suse.de>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:master 8521/9759] drivers/iommu/mtk_iommu.c:878 mtk_iommu_mm_dts_parse() error: uninitialized symbol 'larbnode'.
Date: Fri, 13 May 2022 15:30:17 +0200	[thread overview]
Message-ID: <Yn5daWwNCD8uwTlj@suse.de> (raw)
In-Reply-To: <202205070247.0InKO8AP-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

On Mon, May 09, 2022 at 12:26:31PM +0300, Dan Carpenter wrote:
> d2e9a1102cfc22 Yong Wu 2022-05-03  834  static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **match,
> d2e9a1102cfc22 Yong Wu 2022-05-03  835  				  struct mtk_iommu_data *data)
> 0df4fabe208d95 Yong Wu 2016-02-23  836  {
> baf94e6ebff962 Yong Wu 2021-01-11  837  	struct device_node *larbnode, *smicomm_node;
> baf94e6ebff962 Yong Wu 2021-01-11  838  	struct platform_device *plarbdev;
> baf94e6ebff962 Yong Wu 2021-01-11  839  	struct device_link *link;
> d2e9a1102cfc22 Yong Wu 2022-05-03  840  	int i, larb_nr, ret;
> d2e9a1102cfc22 Yong Wu 2022-05-03  841  
> d2e9a1102cfc22 Yong Wu 2022-05-03  842  	larb_nr = of_count_phandle_with_args(dev->of_node, "mediatek,larbs", NULL);
> d2e9a1102cfc22 Yong Wu 2022-05-03  843  	if (larb_nr < 0)
> d2e9a1102cfc22 Yong Wu 2022-05-03  844  		return larb_nr;
> d2e9a1102cfc22 Yong Wu 2022-05-03  845  
> d2e9a1102cfc22 Yong Wu 2022-05-03  846  	for (i = 0; i < larb_nr; i++) {
> 
> Smatch can't parse of data so it doesn't know that larb_nr can't be
> zero.

Hmm, could larb_nr be zero with a broken/malicous device tree?

-- 
Jörg Rödel
jroedel(a)suse.de

SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
 
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

  reply	other threads:[~2022-05-13 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 18:14 [linux-next:master 8521/9759] drivers/iommu/mtk_iommu.c:878 mtk_iommu_mm_dts_parse() error: uninitialized symbol 'larbnode' kernel test robot
2022-05-09  9:26 ` Dan Carpenter
2022-05-13 13:30 ` Joerg Roedel [this message]
2022-05-14  2:00   ` Yong Wu

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=Yn5daWwNCD8uwTlj@suse.de \
    --to=jroedel@suse.de \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.