lkml.org 
[lkml]   [2006]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.6.19-rc1] radeonfb: check return value of sysfs_create_bin_file
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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-12 01:55    [W:0.045 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site