lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 27 Feb 2008 23:14:25 +0000
From:	Luis Henriques <lhenriques@...visao.pt>
To:	linux-kernel@...r.kernel.org
Cc:	Markus.Lidel@...dowconnect.com
Subject: [PATCH] drivers/message/i2o/device.c warnings

Hi,

file drivers/message/i2o/device.c contains the following warnings:

drivers/message/i2o/device.c: In function ‘i2o_device_add’:
drivers/message/i2o/device.c:247: warning: ignoring return value of ‘sysfs_create_link’, declared with attribute warn_unused_result
drivers/message/i2o/device.c:254: warning: ignoring return value of ‘sysfs_create_link’, declared with attribute warn_unused_result
drivers/message/i2o/device.c:260: warning: ignoring return value of ‘sysfs_create_link’, declared with attribute warn_unused_result
drivers/message/i2o/device.c:267: warning: ignoring return value of ‘sysfs_create_link’, declared with attribute warn_unused_result

The following patch is an attempt to remove these warnings.

Signed-off-by: Luis Henriques <lhenriques <at> netvisao.pt>

diff --git a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c
index 489d7c5..73ade62 100644
--- a/drivers/message/i2o/device.c
+++ b/drivers/message/i2o/device.c
@@ -243,29 +243,41 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
 
        /* create user entries for this device */
        tmp = i2o_iop_find_device(i2o_dev->iop, i2o_dev->lct_data.user_tid);
-       if (tmp && (tmp != i2o_dev))
-               sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj,
-                                 "user");
+       if (tmp && (tmp != i2o_dev)) {
+               rc = sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj,
+                                       "user");
+                if (rc)
+                        goto err;
+        }
 
        /* create user entries refering to this device */
        list_for_each_entry(tmp, &c->devices, list)
            if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
-               && (tmp != i2o_dev))
-               sysfs_create_link(&tmp->device.kobj,
-                                 &i2o_dev->device.kobj, "user");
+               && (tmp != i2o_dev)) {
+               rc = sysfs_create_link(&tmp->device.kobj,
+                                       &i2o_dev->device.kobj, "user");
+                if (rc)
+                        goto err;
+        }
 
        /* create parent entries for this device */
        tmp = i2o_iop_find_device(i2o_dev->iop, i2o_dev->lct_data.parent_tid);
-       if (tmp && (tmp != i2o_dev))
-               sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj,
-                                 "parent");
+       if (tmp && (tmp != i2o_dev)) {
+               rc = sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj,
+                                       "parent");
+                if (rc)
+                        goto err;
+        }
 
        /* create parent entries refering to this device */
        list_for_each_entry(tmp, &c->devices, list)
            if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
-               && (tmp != i2o_dev))
-               sysfs_create_link(&tmp->device.kobj,
-                                 &i2o_dev->device.kobj, "parent");
+               && (tmp != i2o_dev)) {
+               rc = sysfs_create_link(&tmp->device.kobj,
+                                       &i2o_dev->device.kobj, "parent");
+                if (rc)
+                        goto err;
+        }
 
        i2o_driver_notify_device_add_all(i2o_dev);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ