projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b906e5
)
staging: rts_pstor: potential NULL dereference
author
Vasiliy Kulikov
<segoon@openwall.com>
Wed, 2 Feb 2011 18:29:31 +0000
(21:29 +0300)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 4 Feb 2011 21:04:23 +0000
(13:04 -0800)
pci_get_bus_and_slot() may return NULL, but the caller checks
wrong variable.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rts_pstor/rtsx.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/rts_pstor/rtsx.c
b/drivers/staging/rts_pstor/rtsx.c
index 9864b1a47116aba998b79bc1120d97c78f2506e9..2b1837999d7dbadd2bafd13253bb358ad0976e43 100644
(file)
--- a/
drivers/staging/rts_pstor/rtsx.c
+++ b/
drivers/staging/rts_pstor/rtsx.c
@@
-334,7
+334,7
@@
int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 offset, u8 *val)
u8 devfn = (dev << 3) | func;
pdev = pci_get_bus_and_slot(bus, devfn);
- if (!dev)
+ if (!
p
dev)
return -1;
pci_read_config_byte(pdev, offset, &data);