usb: misc: lvstest: don't print on ENOMEM

All kmalloc-based functions print enough information on failures.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Wolfram Sang 2016-08-25 19:39:20 +02:00 committed by Greg Kroah-Hartman
parent 49d8ffab82
commit 5c47fd6166

View file

@ -245,10 +245,8 @@ static ssize_t get_dev_desc_store(struct device *dev,
int ret;
descriptor = kmalloc(sizeof(*descriptor), GFP_KERNEL);
if (!descriptor) {
dev_err(dev, "failed to allocate descriptor memory\n");
if (!descriptor)
return -ENOMEM;
}
udev = create_lvs_device(intf);
if (!udev) {