All of lore.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-input@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Jiri Kosina <jikos@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/6] hid-prodikeys: Delete an unnecessary variable initialisation in pk_probe()
Date: Sat, 3 Feb 2018 18:38:57 +0100	[thread overview]
Message-ID: <fce3ae0c-3467-f6be-519b-79b592691153@users.sourceforge.net> (raw)
In-Reply-To: <c388b4d8-fa43-1bf2-e27d-1a3a8d636118@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 3 Feb 2018 14:45:24 +0100

The local variable "pm" will eventually be set to an appropriate pointer
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/hid/hid-prodikeys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c
index 9cad4973a67b..2e79dfc92162 100644
--- a/drivers/hid/hid-prodikeys.c
+++ b/drivers/hid/hid-prodikeys.c
@@ -798,6 +798,6 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	unsigned short ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
 	unsigned long quirks = id->driver_data;
 	struct pk_device *pk;
-	struct pcmidi_snd *pm = NULL;
+	struct pcmidi_snd *pm;
 
 	pk = kzalloc(sizeof(*pk), GFP_KERNEL);
-- 
2.16.1

WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-input@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Jiri Kosina <jikos@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/6] hid-prodikeys: Delete an unnecessary variable initialisation in pk_probe()
Date: Sat, 03 Feb 2018 17:38:57 +0000	[thread overview]
Message-ID: <fce3ae0c-3467-f6be-519b-79b592691153@users.sourceforge.net> (raw)
In-Reply-To: <c388b4d8-fa43-1bf2-e27d-1a3a8d636118@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 3 Feb 2018 14:45:24 +0100

The local variable "pm" will eventually be set to an appropriate pointer
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/hid/hid-prodikeys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c
index 9cad4973a67b..2e79dfc92162 100644
--- a/drivers/hid/hid-prodikeys.c
+++ b/drivers/hid/hid-prodikeys.c
@@ -798,6 +798,6 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	unsigned short ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
 	unsigned long quirks = id->driver_data;
 	struct pk_device *pk;
-	struct pcmidi_snd *pm = NULL;
+	struct pcmidi_snd *pm;
 
 	pk = kzalloc(sizeof(*pk), GFP_KERNEL);
-- 
2.16.1


  parent reply	other threads:[~2018-02-03 17:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-03 17:36 [PATCH 0/6] HID-Prodikeys: Adjustments for two function implementations SF Markus Elfring
2018-02-03 17:36 ` SF Markus Elfring
2018-02-03 17:37 ` [PATCH 1/6] hid-prodikeys: Delete two error messages for a failed memory allocation in pk_probe() SF Markus Elfring
2018-02-03 17:37   ` SF Markus Elfring
2018-02-03 17:38 ` SF Markus Elfring [this message]
2018-02-03 17:38   ` [PATCH 2/6] hid-prodikeys: Delete an unnecessary variable initialisation " SF Markus Elfring
2018-02-03 17:39 ` [PATCH 3/6] hid-prodikeys: Move an assignment " SF Markus Elfring
2018-02-03 17:39   ` SF Markus Elfring
2018-02-03 17:40 ` [PATCH 4/6] hid-prodikeys: Delete an unnecessary return statement in pcmidi_send_note() SF Markus Elfring
2018-02-03 17:40   ` SF Markus Elfring
2018-02-03 17:41 ` [PATCH 5/6] hid-prodikeys: Combine two condition checks into one " SF Markus Elfring
2018-02-03 17:41   ` SF Markus Elfring
2018-02-03 17:42 ` [PATCH 6/6] hid-prodikeys: Rename a jump label " SF Markus Elfring
2018-02-03 17:42   ` SF Markus Elfring

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=fce3ae0c-3467-f6be-519b-79b592691153@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --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.