linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Silence 'ignoring return value' warnings in drivers/video/aty/radeon_base.c
@ 2008-04-24  4:34 Tony Breeds
  2008-05-06 21:39 ` Andrew Morton
  0 siblings, 1 reply; 29+ messages in thread
From: Tony Breeds @ 2008-04-24  4:34 UTC (permalink / raw)
  To: Linux Kernel ML, Benjamin Herrenschmidt; +Cc: Andrew Morton

Current kernel builds warn about:
drivers/video/aty/radeon_base.c: In function 'radeonfb_pci_register':
drivers/video/aty/radeon_base.c:2334: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result
drivers/video/aty/radeon_base.c:2336: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result

Do minimal checking of these functions and issue a warning if either
fails.  They don't seem to be critical..

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
 drivers/video/aty/radeon_base.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 62867cb..a99f8b6 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2158,6 +2158,7 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
 	struct fb_info *info;
 	struct radeonfb_info *rinfo;
 	int ret;
+	int err = 0;
 
 	RTRACE("radeonfb_pci_register BEGIN\n");
 	
@@ -2331,9 +2332,12 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
 
 	/* Register some sysfs stuff (should be done better) */
 	if (rinfo->mon1_EDID)
-		sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr);
+		err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr);
 	if (rinfo->mon2_EDID)
-		sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr);
+		err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr);
+	if (err)
+		pr_warning("%s() Creating sysfs files failed, continuing\n",
+		           __func__);
 
 	/* save current mode regs before we switch into the new one
 	 * so we can restore this upon __exit
-- 
1.5.5.1


Yours Tony

  linux.conf.au    http://www.marchsouth.org/
  Jan 19 - 24 2009 The Australian Linux Technical Conference!


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

end of thread, other threads:[~2008-05-09  5:35 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-24  4:34 [PATCH] Silence 'ignoring return value' warnings in drivers/video/aty/radeon_base.c Tony Breeds
2008-05-06 21:39 ` Andrew Morton
2008-05-06 21:43   ` David Miller
2008-05-06 21:56     ` Andrew Morton
2008-05-07  4:00       ` Arjan van de Ven
2008-05-07  4:12         ` Andrew Morton
2008-05-07  4:15           ` Arjan van de Ven
2008-05-07  4:20             ` Arjan van de Ven
2008-05-07  4:37               ` Benjamin Herrenschmidt
2008-05-07  4:23             ` Andrew Morton
2008-05-07  4:26               ` Andrew Morton
2008-05-07  4:41                 ` Arjan van de Ven
2008-05-07  4:37               ` Arjan van de Ven
2008-05-07  5:40           ` Paul Mackerras
2008-05-07  5:49             ` Benjamin Herrenschmidt
2008-05-07  0:54     ` Benjamin Herrenschmidt
2008-05-07  1:20       ` Andrew Morton
2008-05-07  4:33         ` Benjamin Herrenschmidt
2008-05-07  8:23           ` Cornelia Huck
2008-05-07 21:43             ` Benjamin Herrenschmidt
2008-05-08  7:34               ` Cornelia Huck
2008-05-08  7:49                 ` Benjamin Herrenschmidt
2008-05-08  8:36                   ` Cornelia Huck
2008-05-08 22:03                     ` Greg KH
2008-05-08 23:06                       ` Benjamin Herrenschmidt
2008-05-08 23:50                       ` Paul Mackerras
2008-05-09  0:02                         ` Harvey Harrison
2008-05-09  5:32                           ` Cornelia Huck
2008-05-09  5:33                           ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).