Skip to content

Commit

Permalink
dlm: Fix uninitialised variable warning in lock.c
Browse files Browse the repository at this point in the history
  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 <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
swhiteho authored and teigland committed Jun 17, 2009
1 parent 65795ef commit a566a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a566a6b

Please sign in to comment.