aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/fs/xfs/xfs_dir2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index f738a582..2f5928a5 100644
--- a/core/fs/xfs/xfs_dir2.c
+++ b/core/fs/xfs/xfs_dir2.c
@@ -630,7 +630,7 @@ struct inode *xfs_dir2_node_find_entry(const char *dname, struct inode *parent,
block_t fsblkno;
xfs_da_node_hdr_t *nhdr;
uint32_t hashwant;
- uint32_t hash;
+ uint32_t hash = 0;
uint16_t i;
uint16_t count;
xfs_da_node_entry_t *btree;
@@ -645,7 +645,7 @@ struct inode *xfs_dir2_node_find_entry(const char *dname, struct inode *parent,
uint8_t *end_name;
int low;
int high;
- int mid;
+ int mid = 0;
uint32_t newdb;
uint32_t curdb;
xfs_intino_t ino;
n value='ib-mfd-pinctrl-regulator-6.10'>ib-mfd-pinctrl-regulator-6.10 MFD Subsystem Tree - Next and FixesLee Jones
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-02-27 10:54:20 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-27 10:54:20 -0800
commit3ebd3da699731929af8ef879001c8c38d1817211 (patch)
treeb037364e95fe0e70410aee8dfa86467a87b3e819
parent8d7531825c0dc24f3f300c07fb1a2a3a00b9e89c (diff)
parent0b7d25c347900e2550398e29e25caf0fefe3cab2 (diff)
downloadmfd-3ebd3da699731929af8ef879001c8c38d1817211.tar.gz
Merge tag 'pwm/for-3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm fix from Thierry Reding: "Just a single trivial patch to plug a memory leak in an error path" * tag 'pwm/for-3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: lp3943: Fix potential memory leak during request
Diffstat
-rw-r--r--drivers/pwm/pwm-lp3943.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-lp3943.c b/drivers/pwm/pwm-lp3943.c
index 8a843a04c22456..a40b9c34e9fffc 100644
--- a/drivers/pwm/pwm-lp3943.c
+++ b/drivers/pwm/pwm-lp3943.c
@@ -52,8 +52,10 @@ lp3943_pwm_request_map(struct lp3943_pwm *lp3943_pwm, int hwpwm)
offset = pwm_map->output[i];
/* Return an error if the pin is already assigned */
- if (test_and_set_bit(offset, &lp3943->pin_used))
+ if (test_and_set_bit(offset, &lp3943->pin_used)) {
+ kfree(pwm_map);
return ERR_PTR(-EBUSY);
+ }
}
return pwm_map;