mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
dlm: Fix uninitialised variable warning in lock.c
CC [M] fs/dlm/lock.o fs/dlm/lock.c: In function ‘find_rsb’: fs/dlm/lock.c:438: warning: ‘r’ may be used uninitialized in this function Since r is used on the error path to set r_ret, set it to NULL. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
65795efbd3
commit
a566a6b11c
1 changed files with 1 additions and 1 deletions
|
@ -435,7 +435,7 @@ static int search_rsb(struct dlm_ls *ls, char *name, int len, int b,
|
|||
static int find_rsb(struct dlm_ls *ls, char *name, int namelen,
|
||||
unsigned int flags, struct dlm_rsb **r_ret)
|
||||
{
|
||||
struct dlm_rsb *r, *tmp;
|
||||
struct dlm_rsb *r = NULL, *tmp;
|
||||
uint32_t hash, bucket;
|
||||
int error = -EINVAL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue