diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-21 15:10:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-21 22:48:29 +0200 |
commit | fe6bc89abe2c2fb93157627def365f33cc05a05e (patch) | |
tree | 471c337897ac255f0cb78fb24361d175332aac77 /drivers/connector/connector.c | |
parent | enetc: simplify the return expression of enetc_vf_set_mac_addr() (diff) | |
download | linux-fe6bc89abe2c2fb93157627def365f33cc05a05e.tar.xz linux-fe6bc89abe2c2fb93157627def365f33cc05a05e.zip |
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>
Diffstat (limited to 'drivers/connector/connector.c')
-rw-r--r-- | drivers/connector/connector.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 2d22d6bf52f2..7d59d18c6f26 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c @@ -197,17 +197,12 @@ int cn_add_callback(struct cb_id *id, const char *name, void (*callback)(struct cn_msg *, struct netlink_skb_parms *)) { - int err; struct cn_dev *dev = &cdev; if (!cn_already_initialized) return -EAGAIN; - err = cn_queue_add_callback(dev->cbdev, name, id, callback); - if (err) - return err; - - return 0; + return cn_queue_add_callback(dev->cbdev, name, id, callback); } EXPORT_SYMBOL_GPL(cn_add_callback); |