Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static int __init xillybus_init(void)
{
- int rc = 0;
-
mutex_init(&ep_list_lock);
xillybus_class = class_create(THIS_MODULE, xillyname);
- if (IS_ERR(xillybus_class)) {
- rc = PTR_ERR(xillybus_class);
- pr_warn("Failed to register class xillybus\n");
-
- return rc;
- }
+ if (IS_ERR(xillybus_class))
+ return PTR_ERR(xillybus_class);
xillybus_wq = alloc_workqueue(xillyname, 0, 0);
if (!xillybus_wq) {