2015-01-30 13:59 GMT+01:00 Peter Hurley pe...@hurleysoftware.com:
On 01/30/2015 07:39 AM, Dan Carpenter wrote:
Btw, if you have the smatch cross function database set up then you can
figure out this sort of thing by using:
$ smdb.py virtpci_driver_attr_store
It says that:
Run your patches through checkpatch.pl.
On Thu, Jan 29, 2015 at 07:50:26PM +0100, Rickard Strandqvist wrote:
- if (dprivate != NULL)
+ if (dprivate != NULL) {
This is a double negative. Just say if (dprivate) {. Actually just
reverse the test and remove the bogus printk. Say:
On 01/30/2015 07:39 AM, Dan Carpenter wrote:
Btw, if you have the smatch cross function database set up then you can
figure out this sort of thing by using:
$ smdb.py virtpci_driver_attr_store
It says that:
fs/sysfs/file.c | sysfs_kf_write | (struct sysfs_ops)-store |
Fix a possible null pointer dereference, there is
otherwise a risk of a possible null pointer dereference.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
---
drivers/staging/unisys/virtpci/virtpci.c |