From: Luca Tettamanti <kronos.it@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.19-rc1] radeonfb: check return value of sysfs_create_bin_file
Date: Thu, 12 Oct 2006 01:53:28 +0200 [thread overview]
Message-ID: <20061011235328.GA13264@dreamland.darkstar.lan> (raw)
sysfs_create_bin_file() is marked as warn_unused_result but we don't
actually check the return value.
Error is not fatal, the driver can operate fine without the files so
just print a notice on failure.
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
---
drivers/video/aty/radeon_base.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 0ed577e..bc2aac6 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2313,10 +2313,17 @@ #endif
radeon_check_modes(rinfo, mode_option);
/* Register some sysfs stuff (should be done better) */
- if (rinfo->mon1_EDID)
- sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr);
- if (rinfo->mon2_EDID)
- sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr);
+ if (rinfo->mon1_EDID) {
+ if (sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr))
+ printk(KERN_INFO "radeonfb (%s): failed to create edid1 file. "
+ "Continuing anyway.\n", pci_name(rinfo->pdev));
+ }
+
+ if (rinfo->mon2_EDID) {
+ if (sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr))
+ printk(KERN_INFO "radeonfb (%s): failed to create edid2 file. "
+ "Continuing anyway.\n", pci_name(rinfo->pdev));
+ }
/* save current mode regs before we switch into the new one
* so we can restore this upon __exit
Luca
--
Dicono che il cane sia il miglior amico dell'uomo. Secondo me non e`
vero. Quanti dei vostri amici avete fatto castrare, recentemente?
next reply other threads:[~2006-10-11 23:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 23:53 Luca Tettamanti [this message]
2006-10-12 0:07 ` Benjamin Herrenschmidt
2006-10-12 15:45 ` Luca Tettamanti
2006-10-12 15:54 ` Andreas Schwab
2006-10-12 16:05 ` Luca Tettamanti
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=20061011235328.GA13264@dreamland.darkstar.lan \
--to=kronos.it@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®