Commit 3f384d7c authored by Mao Wenan's avatar Mao Wenan Committed by Greg Kroah-Hartman

usbip: vhci_hcd indicate failed message

If the return value of vhci_init_attr_group and
sysfs_create_group is non-zero, which mean they failed
to init attr_group and create sysfs group, so it would
better add 'failed' message to indicate that.
This patch also change pr_err to dev_err to trace which
device is failed.

Fixes: 0775a9cb ("usbip: vhci extension: modifications to vhci driver")
Signed-off-by: default avatarMao Wenan <maowenan@huawei.com>
Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20190916150921.152977-1-maowenan@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32a0721c
...@@ -1195,12 +1195,12 @@ static int vhci_start(struct usb_hcd *hcd) ...@@ -1195,12 +1195,12 @@ static int vhci_start(struct usb_hcd *hcd)
if (id == 0 && usb_hcd_is_primary_hcd(hcd)) { if (id == 0 && usb_hcd_is_primary_hcd(hcd)) {
err = vhci_init_attr_group(); err = vhci_init_attr_group();
if (err) { if (err) {
pr_err("init attr group\n"); dev_err(hcd_dev(hcd), "init attr group failed, err = %d\n", err);
return err; return err;
} }
err = sysfs_create_group(&hcd_dev(hcd)->kobj, &vhci_attr_group); err = sysfs_create_group(&hcd_dev(hcd)->kobj, &vhci_attr_group);
if (err) { if (err) {
pr_err("create sysfs files\n"); dev_err(hcd_dev(hcd), "create sysfs files failed, err = %d\n", err);
vhci_finish_attr_group(); vhci_finish_attr_group();
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment