mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
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:
parent
d4b717dd20
commit
fe6bc89abe
1 changed files with 1 additions and 6 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue