All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lentin <jm@lentin.co.uk>
To: Jiri Kosina <jkosina@suse.cz>, Antonio Ospite <ao2@ao2.it>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jamie Lentin <jm@lentin.co.uk>
Subject: [PATCH v6 3/4] HID: lenovo: Don't call function in condition, show error codes
Date: Sat, 26 Jul 2014 15:42:27 +0100	[thread overview]
Message-ID: <1406385747-2444-1-git-send-email-jm@lentin.co.uk> (raw)
In-Reply-To: <1406154648-14000-4-git-send-email-jm@lentin.co.uk>

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
 drivers/hid/hid-lenovo.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index a56b9e7..f96bf09 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -350,6 +350,7 @@ static int lenovo_probe_tpkbd(struct hid_device *hdev)
 	size_t name_sz = strlen(dev_name(dev)) + 16;
 	char *name_mute, *name_micmute;
 	int i;
+	int ret;
 
 	/*
 	 * Only register extra settings against subdevice where input_mapping
@@ -368,10 +369,9 @@ static int lenovo_probe_tpkbd(struct hid_device *hdev)
 	if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 3, 0, 2))
 		return -ENODEV;
 
-	if (sysfs_create_group(&hdev->dev.kobj,
-				&lenovo_attr_group_tpkbd)) {
-		hid_warn(hdev, "Could not create sysfs group\n");
-	}
+	ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_tpkbd);
+	if (ret)
+		hid_warn(hdev, "Could not create sysfs group: %d\n", ret);
 
 	data_pointer = devm_kzalloc(&hdev->dev,
 				    sizeof(struct lenovo_drvdata_tpkbd),
-- 
2.0.0


  parent reply	other threads:[~2014-07-26 14:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 22:30 [PATCH v5 0/4] HID: lenovo: Add support for Lenovo Compact Keyboard Jamie Lentin
2014-07-23 22:30 ` [PATCH v5 1/4] HID: lenovo: Rename hid-lenovo-tpkbd to hid-lenovo Jamie Lentin
2014-07-25 12:56   ` Antonio Ospite
2014-07-23 22:30 ` [PATCH v5 2/4] HID: lenovo: Prepare support for adding other devices Jamie Lentin
2014-07-25 12:58   ` Antonio Ospite
2014-07-23 22:30 ` [PATCH v5 3/4] HID: lenovo: Style fixes Jamie Lentin
2014-07-23 23:37   ` Dmitry Torokhov
2014-07-25 13:33   ` Antonio Ospite
2014-07-26 14:42   ` Jamie Lentin [this message]
2014-07-28 17:46     ` [PATCH v6 3/4] HID: lenovo: Don't call function in condition, show error codes Dmitry Torokhov
2014-07-23 22:30 ` [PATCH v5 4/4] HID: lenovo: Add support for Compact (BT|USB) keyboard Jamie Lentin
2014-07-25 13:39   ` Antonio Ospite
2014-07-25 14:05 ` [PATCH v5 0/4] HID: lenovo: Add support for Lenovo Compact Keyboard Antonio Ospite
2014-07-26 10:09   ` Jamie Lentin
2014-07-29  9:25   ` Jiri Kosina

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=1406385747-2444-1-git-send-email-jm@lentin.co.uk \
    --to=jm@lentin.co.uk \
    --cc=ao2@ao2.it \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --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.