Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Qinglang Miao and committed by
David S. Miller
fe6bc89a d4b717dd

+1 -6
+1 -6
drivers/connector/connector.c
··· 197 197 void (*callback)(struct cn_msg *, 198 198 struct netlink_skb_parms *)) 199 199 { 200 - int err; 201 200 struct cn_dev *dev = &cdev; 202 201 203 202 if (!cn_already_initialized) 204 203 return -EAGAIN; 205 204 206 - err = cn_queue_add_callback(dev->cbdev, name, id, callback); 207 - if (err) 208 - return err; 209 - 210 - return 0; 205 + return cn_queue_add_callback(dev->cbdev, name, id, callback); 211 206 } 212 207 EXPORT_SYMBOL_GPL(cn_add_callback); 213 208