Linux-EDAC Archive on
 help / color / Atom feed
From: Dan Carpenter <>
Subject: [bug report] EDAC/sifive: Add EDAC platform driver for SiFive SoCs
Date: Wed, 14 Aug 2019 17:31:36 +0300
Message-ID: <20190814143136.GA3226@mwanda> (raw)

Hello Yash Shah,

The patch 91abaeaaff35: "EDAC/sifive: Add EDAC platform driver for
SiFive SoCs" from May 6, 2019, leads to the following static checker

	drivers/edac/sifive_edac.c:60 ecc_register()
	warn: 'p->dci' can also be NULL

    43  static int ecc_register(struct platform_device *pdev)
    44  {
    45          struct sifive_edac_priv *p;
    47          p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
    48          if (!p)
    49                  return -ENOMEM;
    51          p->notifier.notifier_call = ecc_err_event;
    52          platform_set_drvdata(pdev, p);
    54          p->dci = edac_device_alloc_ctl_info(0, "sifive_ecc", 1, "sifive_ecc",
    55                                              1, 1, NULL, 0,
    56                                              edac_device_alloc_index());
    57          if (IS_ERR(p->dci))
The edac_device_alloc_ctl_info() function never returns error pointers,
it returns NULL.

    58                  return PTR_ERR(p->dci);
    60          p->dci->dev = &pdev->dev;
    61          p->dci->mod_name = "Sifive ECC Manager";
    62          p->dci->ctl_name = dev_name(&pdev->dev);
    63          p->dci->dev_name = dev_name(&pdev->dev);

dan carpenter

                 reply index

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

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=20190814143136.GA3226@mwanda \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-EDAC Archive on

Archives are clonable:
	git clone --mirror linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ \
	public-inbox-index linux-edac

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox