From: Oliver Neukum Date: Wed, 5 Aug 2020 12:07:08 +0000 (+0200) Subject: usb: hso: no complaint about kmalloc failure X-Git-Tag: v5.15~3197^2~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11c5f6d2f2a8f34f64dfcdec4090d2c17539c2c3;p=platform%2Fkernel%2Flinux-starfive.git usb: hso: no complaint about kmalloc failure If this fails, kmalloc() will print a report including a stack trace. There is no need for a separate complaint. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 031a5ad..5762876 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2465,10 +2465,9 @@ static void hso_create_rfkill(struct hso_device *hso_dev, &interface_to_usbdev(interface)->dev, RFKILL_TYPE_WWAN, &hso_rfkill_ops, hso_dev); - if (!hso_net->rfkill) { - dev_err(dev, "%s - Out of memory\n", __func__); + if (!hso_net->rfkill) return; - } + if (rfkill_register(hso_net->rfkill) < 0) { rfkill_destroy(hso_net->rfkill); hso_net->rfkill = NULL;