diff options
author | Wolfram Sang <wsa-dev@sang-engineering.com> | 2016-08-11 17:14:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-15 09:54:26 -0400 |
commit | d3ec72b0c15839600aa03d97c69313f53024015e (patch) | |
tree | 64ed2b8f31b6c7892459a695ec0e4536a24ebff9 | |
parent | c6b1caaf2a6446516b5c8620d423ea2593142f03 (diff) |
usb: misc: ftdi-elan: don't print error when allocating urb fails
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 59031dc21eab..4eb1e2e3f039 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -782,11 +782,8 @@ static int ftdi_elan_command_engine(struct usb_ftdi *ftdi) | |||
782 | return 0; | 782 | return 0; |
783 | total_size = ftdi_elan_total_command_size(ftdi, command_size); | 783 | total_size = ftdi_elan_total_command_size(ftdi, command_size); |
784 | urb = usb_alloc_urb(0, GFP_KERNEL); | 784 | urb = usb_alloc_urb(0, GFP_KERNEL); |
785 | if (!urb) { | 785 | if (!urb) |
786 | dev_err(&ftdi->udev->dev, "could not get a urb to write %d commands totaling %d bytes to the Uxxx\n", | ||
787 | command_size, total_size); | ||
788 | return -ENOMEM; | 786 | return -ENOMEM; |
789 | } | ||
790 | buf = usb_alloc_coherent(ftdi->udev, total_size, GFP_KERNEL, | 787 | buf = usb_alloc_coherent(ftdi->udev, total_size, GFP_KERNEL, |
791 | &urb->transfer_dma); | 788 | &urb->transfer_dma); |
792 | if (!buf) { | 789 | if (!buf) { |
@@ -1945,10 +1942,8 @@ static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi) | |||
1945 | int I = 257; | 1942 | int I = 257; |
1946 | int i = 0; | 1943 | int i = 0; |
1947 | urb = usb_alloc_urb(0, GFP_KERNEL); | 1944 | urb = usb_alloc_urb(0, GFP_KERNEL); |
1948 | if (!urb) { | 1945 | if (!urb) |
1949 | dev_err(&ftdi->udev->dev, "could not alloc a urb for flush sequence\n"); | ||
1950 | return -ENOMEM; | 1946 | return -ENOMEM; |
1951 | } | ||
1952 | buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); | 1947 | buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); |
1953 | if (!buf) { | 1948 | if (!buf) { |
1954 | dev_err(&ftdi->udev->dev, "could not get a buffer for flush sequence\n"); | 1949 | dev_err(&ftdi->udev->dev, "could not get a buffer for flush sequence\n"); |
@@ -1985,10 +1980,8 @@ static int ftdi_elan_synchronize_reset(struct usb_ftdi *ftdi) | |||
1985 | int I = 4; | 1980 | int I = 4; |
1986 | int i = 0; | 1981 | int i = 0; |
1987 | urb = usb_alloc_urb(0, GFP_KERNEL); | 1982 | urb = usb_alloc_urb(0, GFP_KERNEL); |
1988 | if (!urb) { | 1983 | if (!urb) |
1989 | dev_err(&ftdi->udev->dev, "could not get a urb for the reset sequence\n"); | ||
1990 | return -ENOMEM; | 1984 | return -ENOMEM; |
1991 | } | ||
1992 | buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); | 1985 | buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); |
1993 | if (!buf) { | 1986 | if (!buf) { |
1994 | dev_err(&ftdi->udev->dev, "could not get a buffer for the reset sequence\n"); | 1987 | dev_err(&ftdi->udev->dev, "could not get a buffer for the reset sequence\n"); |