Skip to content

Commit a341131

Browse files
sacrenidryomov
authored andcommitted
libceph: drop ->monmap and err initialization
Call to build_initial_monmap() is one stone two birds. Explicitly it initializes err variable. Implicitly it initializes ->monmap via call to kzalloc(). We should only declare err and ->monmap is taken care of by ceph_monc_init() prototype. Signed-off-by: Jean Sacren <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 9c43ff4 commit a341131

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/ceph/mon_client.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,12 +1153,11 @@ static int build_initial_monmap(struct ceph_mon_client *monc)
11531153

11541154
int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
11551155
{
1156-
int err = 0;
1156+
int err;
11571157

11581158
dout("init\n");
11591159
memset(monc, 0, sizeof(*monc));
11601160
monc->client = cl;
1161-
monc->monmap = NULL;
11621161
mutex_init(&monc->mutex);
11631162

11641163
err = build_initial_monmap(monc);

0 commit comments

Comments
 (0)