ceph: avoid possible null dereference

ac->ops may be null; use protocol id in error message instead.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2010-05-25 09:24:42 -07:00
Родитель aa91647c89
Коммит e95e9a7ae4
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -217,8 +217,8 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
if (ac->protocol != protocol) { if (ac->protocol != protocol) {
ret = ceph_auth_init_protocol(ac, protocol); ret = ceph_auth_init_protocol(ac, protocol);
if (ret) { if (ret) {
pr_err("error %d on auth method %s init\n", pr_err("error %d on auth protocol %d init\n",
ret, ac->ops->name); ret, protocol);
goto out; goto out;
} }
} }