diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-28 14:43:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 14:58:58 -0400 |
commit | 4d42e1bb9e8ec7eb5e39d82aaf3ff2f3c994af84 (patch) | |
tree | 1316e32df6772e99221a9b88cbcc6f60abfc3f54 /drivers/usb/misc/cytherm.c | |
parent | 1b21d5e166e104f8914441ef52e2cd50ce65b479 (diff) |
USB: fix __must_check warnings in drivers/usb/misc/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/cytherm.c')
-rw-r--r-- | drivers/usb/misc/cytherm.c | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c index b20bec445552..04e87acd6e46 100644 --- a/drivers/usb/misc/cytherm.c +++ b/drivers/usb/misc/cytherm.c | |||
@@ -353,7 +353,7 @@ static int cytherm_probe(struct usb_interface *interface, | |||
353 | dev = kzalloc (sizeof(struct usb_cytherm), GFP_KERNEL); | 353 | dev = kzalloc (sizeof(struct usb_cytherm), GFP_KERNEL); |
354 | if (dev == NULL) { | 354 | if (dev == NULL) { |
355 | dev_err (&interface->dev, "Out of memory\n"); | 355 | dev_err (&interface->dev, "Out of memory\n"); |
356 | goto error; | 356 | goto error_mem; |
357 | } | 357 | } |
358 | 358 | ||
359 | dev->udev = usb_get_dev(udev); | 359 | dev->udev = usb_get_dev(udev); |
@@ -362,18 +362,35 @@ static int cytherm_probe(struct usb_interface *interface, | |||
362 | 362 | ||
363 | dev->brightness = 0xFF; | 363 | dev->brightness = 0xFF; |
364 | 364 | ||
365 | device_create_file(&interface->dev, &dev_attr_brightness); | 365 | retval = device_create_file(&interface->dev, &dev_attr_brightness); |
366 | device_create_file(&interface->dev, &dev_attr_temp); | 366 | if (retval) |
367 | device_create_file(&interface->dev, &dev_attr_button); | 367 | goto error; |
368 | device_create_file(&interface->dev, &dev_attr_port0); | 368 | retval = device_create_file(&interface->dev, &dev_attr_temp); |
369 | device_create_file(&interface->dev, &dev_attr_port1); | 369 | if (retval) |
370 | goto error; | ||
371 | retval = device_create_file(&interface->dev, &dev_attr_button); | ||
372 | if (retval) | ||
373 | goto error; | ||
374 | retval = device_create_file(&interface->dev, &dev_attr_port0); | ||
375 | if (retval) | ||
376 | goto error; | ||
377 | retval = device_create_file(&interface->dev, &dev_attr_port1); | ||
378 | if (retval) | ||
379 | goto error; | ||
370 | 380 | ||
371 | dev_info (&interface->dev, | 381 | dev_info (&interface->dev, |
372 | "Cypress thermometer device now attached\n"); | 382 | "Cypress thermometer device now attached\n"); |
373 | return 0; | 383 | return 0; |
374 | 384 | error: | |
375 | error: | 385 | device_remove_file(&interface->dev, &dev_attr_brightness); |
386 | device_remove_file(&interface->dev, &dev_attr_temp); | ||
387 | device_remove_file(&interface->dev, &dev_attr_button); | ||
388 | device_remove_file(&interface->dev, &dev_attr_port0); | ||
389 | device_remove_file(&interface->dev, &dev_attr_port1); | ||
390 | usb_set_intfdata (interface, NULL); | ||
391 | usb_put_dev(dev->udev); | ||
376 | kfree(dev); | 392 | kfree(dev); |
393 | error_mem: | ||
377 | return retval; | 394 | return retval; |
378 | } | 395 | } |
379 | 396 | ||