public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] ARM: OMAP: Fix warnings in leds-omap-pwm.c
Date: Sat, 20 Jan 2007 08:07:32 +0100	[thread overview]
Message-ID: <45B1BFB4.5000503@googlemail.com> (raw)

[-- 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 --]



             reply	other threads:[~2007-01-20  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-20  7:07 Dirk Behme [this message]
2007-01-26 21:33 ` [PATCH] ARM: OMAP: Fix warnings in leds-omap-pwm.c Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45B1BFB4.5000503@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox