diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 15:18:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 15:18:33 -0700 |
commit | ef9efe43f2eddabee1e78a90c7c8451505bf05e1 (patch) | |
tree | b371cf7186d383890f6df1d127ce27fec67a0c3c /kernel/auditfilter.c | |
parent | 8dfd588c3180b7403c402b4545164ee4543f8f86 (diff) | |
parent | b1734d2388cc45ecdec58615e35955d0d402f938 (diff) | |
download | linux-ef9efe43f2eddabee1e78a90c7c8451505bf05e1.tar.gz linux-ef9efe43f2eddabee1e78a90c7c8451505bf05e1.tar.bz2 linux-ef9efe43f2eddabee1e78a90c7c8451505bf05e1.zip |
Merge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
drivers/atm/ambassador: kill uninit'd var warning, and fix bug
[libata] sata_mv: use pci_try_set_mwi()
drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
drivers/net/wan/sbni: kill uninit'd var warning
drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var
drivers/telephony/ixj: cleanup and fix gcc warning
drivers/net/wan/pc300_drv: fix bug caught by gcc warning
drivers/usb/misc/auerswald: fix status check, remove redundant check
[netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails
[netdrvr] natsemi: Fix device removal bug
kernel/auditfilter: kill bogus uninit'd-var compiler warning
Diffstat (limited to 'kernel/auditfilter.c')
-rw-r--r-- | kernel/auditfilter.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index ce61f423542c..1bf093dcffe0 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1210,8 +1210,8 @@ static inline int audit_add_rule(struct audit_entry *entry, struct audit_entry *e; struct audit_field *inode_f = entry->rule.inode_f; struct audit_watch *watch = entry->rule.watch; - struct nameidata *ndp, *ndw; - int h, err, putnd_needed = 0; + struct nameidata *ndp = NULL, *ndw = NULL; + int h, err; #ifdef CONFIG_AUDITSYSCALL int dont_count = 0; @@ -1239,7 +1239,6 @@ static inline int audit_add_rule(struct audit_entry *entry, err = audit_get_nd(watch->path, &ndp, &ndw); if (err) goto error; - putnd_needed = 1; } mutex_lock(&audit_filter_mutex); @@ -1269,14 +1268,11 @@ static inline int audit_add_rule(struct audit_entry *entry, #endif mutex_unlock(&audit_filter_mutex); - if (putnd_needed) - audit_put_nd(ndp, ndw); - + audit_put_nd(ndp, ndw); /* NULL args OK */ return 0; error: - if (putnd_needed) - audit_put_nd(ndp, ndw); + audit_put_nd(ndp, ndw); /* NULL args OK */ if (watch) audit_put_watch(watch); /* tmp watch, matches initial get */ return err; |