Linux Input Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Input: snvs_pwrkey - remove gratuitous NULL initializers
@ 2019-11-25 21:14 Dmitry Torokhov
  2019-11-26  0:40 ` Anson Huang
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2019-11-25 21:14 UTC (permalink / raw)
  To: linux-input; +Cc: Anson Huang, Robin van der Gracht, linux-kernel

Gratuitous NULL initializers rarely help and often prevent compiler
from warning about using uninitialized variable. Let's remove them.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/keyboard/snvs_pwrkey.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
index fd6f244f403d..2f5e3ab5ed63 100644
--- a/drivers/input/keyboard/snvs_pwrkey.c
+++ b/drivers/input/keyboard/snvs_pwrkey.c
@@ -108,8 +108,8 @@ static void imx_snvs_pwrkey_act(void *pdata)
 
 static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
 {
-	struct pwrkey_drv_data *pdata = NULL;
-	struct input_dev *input = NULL;
+	struct pwrkey_drv_data *pdata;
+	struct input_dev *input;
 	struct device_node *np;
 	int error;
 	u32 vid;
-- 
2.24.0.432.g9d3f5f5b63-goog


-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] Input: snvs_pwrkey - remove gratuitous NULL initializers
  2019-11-25 21:14 [PATCH] Input: snvs_pwrkey - remove gratuitous NULL initializers Dmitry Torokhov
@ 2019-11-26  0:40 ` Anson Huang
  0 siblings, 0 replies; 2+ messages in thread
From: Anson Huang @ 2019-11-26  0:40 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: Robin van der Gracht, linux-kernel



> Subject: [PATCH] Input: snvs_pwrkey - remove gratuitous NULL initializers
> 
> Gratuitous NULL initializers rarely help and often prevent compiler from
> warning about using uninitialized variable. Let's remove them.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Reviewed-by: Anson Huang <Anson.Huang@nxp.com>

> ---
>  drivers/input/keyboard/snvs_pwrkey.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/snvs_pwrkey.c
> b/drivers/input/keyboard/snvs_pwrkey.c
> index fd6f244f403d..2f5e3ab5ed63 100644
> --- a/drivers/input/keyboard/snvs_pwrkey.c
> +++ b/drivers/input/keyboard/snvs_pwrkey.c
> @@ -108,8 +108,8 @@ static void imx_snvs_pwrkey_act(void *pdata)
> 
>  static int imx_snvs_pwrkey_probe(struct platform_device *pdev)  {
> -	struct pwrkey_drv_data *pdata = NULL;
> -	struct input_dev *input = NULL;
> +	struct pwrkey_drv_data *pdata;
> +	struct input_dev *input;
>  	struct device_node *np;
>  	int error;
>  	u32 vid;
> --
> 2.24.0.432.g9d3f5f5b63-goog
> 
> 
> --
> Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 21:14 [PATCH] Input: snvs_pwrkey - remove gratuitous NULL initializers Dmitry Torokhov
2019-11-26  0:40 ` Anson Huang

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git