Skip to contentSkip to conversation

ARM: OMAP: Fix warnings in plat-omap/dsp

PATCH New Dirk Behme 1 participant 1 message Oct 27, 2006

Subsystems (2)
lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 ARM: OMAP: Fix warnings in plat-omap/dsp

Fix various warnings

warning: ignoring return value of 'xxx', declared with attribute warn_unused_result

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>
arch/arm/plat-omap/dsp/dsp_ctl.c +14 -4
Index: linux-osk/arch/arm/plat-omap/dsp/dsp_ctl.c
===================================================================
@@ -273,7 +273,9 @@ static int dsp_cfg(void)
 		goto out;
 
 	/* create runtime sysfs entries */
-	device_create_file(omap_dsp->dev, &dev_attr_loadinfo);
+	ret = device_create_file(omap_dsp->dev, &dev_attr_loadinfo);
+	if (unlikely(ret != 0))
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
 
 out:
 	dsp_mem_disable((void *)dspmem_base);
@@ -1038,9 +1040,17 @@ out:
 
 void __init dsp_ctl_init(void)
 {
-	device_create_file(omap_dsp->dev, &dev_attr_ifver);
-	device_create_file(omap_dsp->dev, &dev_attr_cpustat);
-	device_create_file(omap_dsp->dev, &dev_attr_icrmask);
+	int ret;
+
+	ret = device_create_file(omap_dsp->dev, &dev_attr_ifver);
+	if (unlikely(ret != 0))
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
+	ret = device_create_file(omap_dsp->dev, &dev_attr_cpustat);
+	if (unlikely(ret != 0))
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
+	ret = device_create_file(omap_dsp->dev, &dev_attr_icrmask);
+	if (unlikely(ret != 0))
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
 }
 
 void dsp_ctl_exit(void)
arch/arm/plat-omap/dsp/dsp_mem.c +15 -3
Index: linux-osk/arch/arm/plat-omap/dsp/dsp_mem.c
===================================================================
@@ -2504,9 +2504,21 @@ int __init dsp_mem_init(void)
 	/* MMU interrupt is not enabled until DSP runs */
 	disable_irq(omap_dsp->mmu_irq);
 
-	device_create_file(omap_dsp->dev, &dev_attr_mmu);
-	device_create_file(omap_dsp->dev, &dev_attr_exmap);
-	device_create_file(omap_dsp->dev, &dev_attr_mempool);
+	ret = device_create_file(omap_dsp->dev, &dev_attr_mmu);
+	if (unlikely(ret != 0)) {
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
+		return ret;
+	}
+	ret = device_create_file(omap_dsp->dev, &dev_attr_exmap);
+	if (unlikely(ret != 0)) {
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
+		return ret;
+	}
+	ret = device_create_file(omap_dsp->dev, &dev_attr_mempool);
+	if (unlikely(ret != 0)) {
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
+		return ret;
+	}
 
 	return 0;
 }
arch/arm/plat-omap/dsp/ipbuf.c +5 -1
Index: linux-osk/arch/arm/plat-omap/dsp/ipbuf.c
===================================================================
@@ -117,7 +117,11 @@ int ipbuf_config(u16 ln, u16 lsz, void *
 	       "           %d words * %d lines at 0x%p.\n",
 	       ipbcfg.lsz, ipbcfg.ln, ipbcfg.base);
 
-	device_create_file(omap_dsp->dev, &dev_attr_ipbuf);
+	ret = device_create_file(omap_dsp->dev, &dev_attr_ipbuf);
+	if (unlikely(ret != 0)) {
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
+		goto free_out;
+	}
 
 	return ret;
 
arch/arm/plat-omap/dsp/mblog.c +5 -1
Index: linux-osk/arch/arm/plat-omap/dsp/mblog.c
===================================================================
@@ -260,7 +260,11 @@ static struct device_attribute dev_attr_
 
 void __init mblog_init(void)
 {
-	device_create_file(omap_dsp->dev, &dev_attr_mblog);
+	int ret;
+
+	ret = device_create_file(omap_dsp->dev, &dev_attr_mblog);
+	if (unlikely(ret != 0))
+		printk(KERN_ERR "device_create_file failed: %d\n", ret);
 }
 
 void mblog_exit(void)
arch/arm/plat-omap/dsp/task.c +46 -14

103 lines not on this page · raw message