All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <lhenriques@netvisao.pt>
To: linux-kernel@vger.kernel.org
Cc: Markus.Lidel@shadowconnect.com
Subject: [PATCH] drivers/message/i2o/device.c warnings
Date: Wed, 27 Feb 2008 23:14:25 +0000	[thread overview]
Message-ID: <874pbum1pq.fsf@hades.astedixie.com> (raw)

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);

                 reply	other threads:[~2008-02-27 23:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874pbum1pq.fsf@hades.astedixie.com \
    --to=lhenriques@netvisao.pt \
    --cc=Markus.Lidel@shadowconnect.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.