public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: Fix warnings in leds-omap-pwm.c
@ 2007-01-20  7:07 Dirk Behme
  2007-01-26 21:33 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Dirk Behme @ 2007-01-20  7:07 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]


ARM: OMAP: Fix warnings in leds-omap-pwm.c:

drivers/leds/leds-omap-pwm.c: In function 'omap_pwm_led_probe':
drivers/leds/leds-omap-pwm.c:260: warning: ignoring return
value of 'class_device_create_file', declared with attribute
warn_unused_result
drivers/leds/leds-omap-pwm.c:262: warning: ignoring return
value of 'class_device_create_file', declared with attribute
warn_unused_result

Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>


[-- Attachment #2: leds_omap_pwm_warning_fix --]
[-- Type: text/plain, Size: 1258 bytes --]

Index: linux-osk/drivers/leds/leds-omap-pwm.c
===================================================================
--- linux-osk.orig/drivers/leds/leds-omap-pwm.c
+++ linux-osk/drivers/leds/leds-omap-pwm.c
@@ -253,19 +253,30 @@ static int omap_pwm_led_probe(struct pla
 		if (led->blink_timer == NULL) {
 			dev_err(&pdev->dev, "failed to request blinking pwm timer\n");
 			ret = -ENODEV;
-			goto error_blink;
+			goto error_blink1;
 		}
 		omap_dm_timer_disable(led->blink_timer);
 
-		class_device_create_file(led->cdev.class_dev,
-					 &class_device_attr_on_period);
-		class_device_create_file(led->cdev.class_dev,
-					 &class_device_attr_off_period);
+		ret = class_device_create_file(led->cdev.class_dev,
+					       &class_device_attr_on_period);
+		if(ret)
+			goto error_blink2;
+
+		ret = class_device_create_file(led->cdev.class_dev,
+					        &class_device_attr_off_period);
+		if(ret)
+			goto error_blink3;
+
 	}
 
 	return 0;
 
-error_blink:
+error_blink3:
+	class_device_remove_file(led->cdev.class_dev,
+				 &class_device_attr_on_period);
+error_blink2:
+	dev_err(&pdev->dev, "failed to create device file(s)\n");
+error_blink1:
 	omap_dm_timer_free(led->intensity_timer);
 error_intensity:
 	led_classdev_unregister(&led->cdev);


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: OMAP: Fix warnings in leds-omap-pwm.c
  2007-01-20  7:07 [PATCH] ARM: OMAP: Fix warnings in leds-omap-pwm.c Dirk Behme
@ 2007-01-26 21:33 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2007-01-26 21:33 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source

* Dirk Behme <dirk.behme@googlemail.com> [070119 23:09]:
> 
> ARM: OMAP: Fix warnings in leds-omap-pwm.c:
> 
> drivers/leds/leds-omap-pwm.c: In function 'omap_pwm_led_probe':
> drivers/leds/leds-omap-pwm.c:260: warning: ignoring return
> value of 'class_device_create_file', declared with attribute
> warn_unused_result
> drivers/leds/leds-omap-pwm.c:262: warning: ignoring return
> value of 'class_device_create_file', declared with attribute
> warn_unused_result

Pushing today.

Tony

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-26 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-20  7:07 [PATCH] ARM: OMAP: Fix warnings in leds-omap-pwm.c Dirk Behme
2007-01-26 21:33 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox