Commit 1a137b47 authored by Kangjie Lu's avatar Kangjie Lu Committed by Greg Kroah-Hartman

usb: sierra: fix a missing check of device_create_file

device_create_file() could fail and return an error code. The fix
captures the error and returns the error code upstream in case it
indeed failed.
Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f926da42
......@@ -194,8 +194,6 @@ int sierra_ms_init(struct us_data *us)
kfree(swocInfo);
}
complete:
result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst);
return 0;
return device_create_file(&us->pusb_intf->dev, &dev_attr_truinst);
}
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