From 5c47fd6166ce644d403787586eb206b910df7413 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Thu, 25 Aug 2016 19:39:20 +0200 Subject: [PATCH] usb: misc: lvstest: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/lvstest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c index 9c49334..7717651 100644 --- a/drivers/usb/misc/lvstest.c +++ b/drivers/usb/misc/lvstest.c @@ -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) { -- 2.7.4