Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1733082
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] [media] ma901: Delete two error messages for a failed memory allocation in usb_ma901radio_probe() |
| Date | 2017-09-15 22:50 +0200 |
| Message-ID | <uq5IK-85U-11@gated-at.bofh.it> (permalink) |
| References | <uq5IJ-85U-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Sep 2017 22:20:04 +0200
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/radio/radio-ma901.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/radio/radio-ma901.c b/drivers/media/radio/radio-ma901.c
index fdc481257efd..c386fbd63703 100644
--- a/drivers/media/radio/radio-ma901.c
+++ b/drivers/media/radio/radio-ma901.c
@@ -361,10 +361,8 @@ static int usb_ma901radio_probe(struct usb_interface *intf,
if (!radio) {
- dev_err(&intf->dev, "kzalloc for ma901radio_device failed\n");
retval = -ENOMEM;
goto err;
}
radio->buffer = kmalloc(BUFFER_LENGTH, GFP_KERNEL);
if (!radio->buffer) {
- dev_err(&intf->dev, "kmalloc for radio->buffer failed\n");
retval = -ENOMEM;
--
2.14.1
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] [media] MA901: Adjustments for usb_ma901radio_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 22:50 +0200 [PATCH 2/2] [media] ma901: Improve a size determination in usb_ma901radio_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 22:50 +0200 [PATCH 1/2] [media] ma901: Delete two error messages for a failed memory allocation in usb_ma901radio_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 22:50 +0200
csiph-web