aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/media/stv680.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 15:29:43 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:59 -0500
commit80b6ca48321974a6566a1c9048ba34f60420bca6 (patch)
treea350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/media/stv680.c
parentd54a5cb6484705f7808b337917cc7598f2f971c3 (diff)
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/media/stv680.c')
-rw-r--r--drivers/usb/media/stv680.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c
index b1a6be2958ed..9636da20748d 100644
--- a/drivers/usb/media/stv680.c
+++ b/drivers/usb/media/stv680.c
@@ -318,12 +318,11 @@ static int stv_init (struct usb_stv *stv680)
318 unsigned char *buffer; 318 unsigned char *buffer;
319 unsigned long int bufsize; 319 unsigned long int bufsize;
320 320
321 buffer = kmalloc (40, GFP_KERNEL); 321 buffer = kzalloc (40, GFP_KERNEL);
322 if (buffer == NULL) { 322 if (buffer == NULL) {
323 PDEBUG (0, "STV(e): Out of (small buf) memory"); 323 PDEBUG (0, "STV(e): Out of (small buf) memory");
324 return -1; 324 return -1;
325 } 325 }
326 memset (buffer, 0, 40);
327 udelay (100); 326 udelay (100);
328 327
329 /* set config 1, interface 0, alternate 0 */ 328 /* set config 1, interface 0, alternate 0 */
@@ -1388,14 +1387,12 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
1388 goto error; 1387 goto error;
1389 } 1388 }
1390 /* We found one */ 1389 /* We found one */
1391 if ((stv680 = kmalloc (sizeof (*stv680), GFP_KERNEL)) == NULL) { 1390 if ((stv680 = kzalloc (sizeof (*stv680), GFP_KERNEL)) == NULL) {
1392 PDEBUG (0, "STV(e): couldn't kmalloc stv680 struct."); 1391 PDEBUG (0, "STV(e): couldn't kmalloc stv680 struct.");
1393 retval = -ENOMEM; 1392 retval = -ENOMEM;
1394 goto error; 1393 goto error;
1395 } 1394 }
1396 1395
1397 memset (stv680, 0, sizeof (*stv680));
1398
1399 stv680->udev = dev; 1396 stv680->udev = dev;
1400 stv680->camera_name = camera_name; 1397 stv680->camera_name = camera_name;
1401 1398