From: Dan Carpenter <dan.carpenter@linaro.org>
To: thor.thayer@linux.intel.com
Cc: linux-edac@vger.kernel.org
Subject: [bug report] EDAC/altera: Initialize peripheral FIFOs in probe()
Date: Wed, 19 Apr 2023 17:33:08 +0300 [thread overview]
Message-ID: <0a108941-4158-4dbe-a993-691c7c8fb338@kili.mountain> (raw)
Hello Thor Thayer,
The patch 788586efd116: "EDAC/altera: Initialize peripheral FIFOs in
probe()" from Mar 26, 2019, leads to the following Smatch static
checker warning:
drivers/edac/altera_edac.c:1650 socfpga_init_sdmmc_ecc()
warn: inconsistent refcounting 'child->kobj.kref.refcount.refs.counter':
inc on: 1646
dec on: 1650
drivers/edac/altera_edac.c
1624 static int __init socfpga_init_sdmmc_ecc(struct altr_edac_device_dev *device)
1625 {
1626 int rc = -ENODEV;
1627 struct device_node *child;
1628
1629 child = of_find_compatible_node(NULL, NULL, "altr,socfpga-sdmmc-ecc");
1630 if (!child)
1631 return -ENODEV;
1632
1633 if (!of_device_is_available(child))
1634 goto exit;
1635
1636 if (validate_parent_available(child))
1637 goto exit;
1638
1639 /* Init portB */
1640 rc = altr_init_a10_ecc_block(child, ALTR_A10_SDMMC_IRQ_MASK,
1641 a10_sdmmceccb_data.ecc_enable_mask, 1);
1642 if (rc)
1643 goto exit;
1644
1645 /* Setup portB */
1646 return altr_portb_setup(device);
Should we call of_node_put() if altr_portb_setup() fails?
1647
1648 exit:
1649 of_node_put(child);
--> 1650 return rc;
1651 }
regards,
dan carpenter
reply other threads:[~2023-04-19 14:33 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=0a108941-4158-4dbe-a993-691c7c8fb338@kili.mountain \
--to=dan.carpenter@linaro.org \
--cc=linux-edac@vger.kernel.org \
--cc=thor.thayer@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).