connector: simplify the return expression of cn_add_callback()

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Qinglang Miao 2020-09-21 21:10:06 +08:00 committed by David S. Miller
parent d4b717dd20
commit fe6bc89abe
1 changed files with 1 additions and 6 deletions

View File

@ -197,17 +197,12 @@ int cn_add_callback(struct cb_id *id, const char *name,
void (*callback)(struct cn_msg *, void (*callback)(struct cn_msg *,
struct netlink_skb_parms *)) struct netlink_skb_parms *))
{ {
int err;
struct cn_dev *dev = &cdev; struct cn_dev *dev = &cdev;
if (!cn_already_initialized) if (!cn_already_initialized)
return -EAGAIN; return -EAGAIN;
err = cn_queue_add_callback(dev->cbdev, name, id, callback); return cn_queue_add_callback(dev->cbdev, name, id, callback);
if (err)
return err;
return 0;
} }
EXPORT_SYMBOL_GPL(cn_add_callback); EXPORT_SYMBOL_GPL(cn_add_callback);