1
0
Fork 0

usb: host: max3421-hcd: 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>
hifive-unleashed-5.1
Wolfram Sang 2016-08-25 19:39:07 +02:00 committed by Greg Kroah-Hartman
parent 2652de71c5
commit 13dcf78005
1 changed files with 2 additions and 6 deletions

View File

@ -1856,15 +1856,11 @@ max3421_probe(struct spi_device *spi)
INIT_LIST_HEAD(&max3421_hcd->ep_list);
max3421_hcd->tx = kmalloc(sizeof(*max3421_hcd->tx), GFP_KERNEL);
if (!max3421_hcd->tx) {
dev_err(&spi->dev, "failed to kmalloc tx buffer\n");
if (!max3421_hcd->tx)
goto error;
}
max3421_hcd->rx = kmalloc(sizeof(*max3421_hcd->rx), GFP_KERNEL);
if (!max3421_hcd->rx) {
dev_err(&spi->dev, "failed to kmalloc rx buffer\n");
if (!max3421_hcd->rx)
goto error;
}
max3421_hcd->spi_thread = kthread_run(max3421_spi_thread, hcd,
"max3421_spi_thread");