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 <[email protected]>
---
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]