From: Jean Sacren Date: Mon, 11 Oct 2021 06:45:24 +0000 (-0600) Subject: libceph: drop ->monmap and err initialization X-Git-Tag: v6.6.17~8816^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a341131eb31e55c31f61c038f152a66634d16095;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov --- diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 013cbdb..6a6898e 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -1153,12 +1153,11 @@ static int build_initial_monmap(struct ceph_mon_client *monc) int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) { - int err = 0; + int err; dout("init\n"); memset(monc, 0, sizeof(*monc)); monc->client = cl; - monc->monmap = NULL; mutex_init(&monc->mutex); err = build_initial_monmap(monc);