From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] amd-xgbe: Add PCI device support
Date: Tue, 15 Nov 2016 11:11:02 +0000 [thread overview]
Message-ID: <20161115111102.GA23305@mwanda> (raw)
Hello Lendacky, Thomas,
The patch 47f164deab22: "amd-xgbe: Add PCI device support" from Nov
10, 2016, leads to the following static checker warning:
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c:360 xprop_reg_value_write()
error: uninitialized symbol 'value'.
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
348 static ssize_t xprop_reg_value_write(struct file *filp,
349 const char __user *buffer,
350 size_t count, loff_t *ppos)
351 {
352 struct xgbe_prv_data *pdata = filp->private_data;
353 unsigned int value;
354 ssize_t len;
355
356 len = xgbe_common_write(buffer, count, ppos, &value);
Assume "ppos" is non-zero then we are using uninitialized data. I
suspect that xgbe_common_write() is buggy.
357 if (len < 0)
358 return len;
359
360 XP_IOWRITE(pdata, pdata->debugfs_xprop_reg, value);
361
362 return len;
363 }
regards,
dan carpenter
next reply other threads:[~2016-11-15 11:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 11:11 Dan Carpenter [this message]
2016-11-15 14:24 ` [bug report] amd-xgbe: Add PCI device support Tom Lendacky
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=20161115111102.GA23305@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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