public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: corsair-psu: fix plain integer used as NULL pointer
@ 2021-11-13  6:53 Wilken Gottwalt
  2021-11-14 16:52 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Wilken Gottwalt @ 2021-11-13  6:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jean Delvare, Guenter Roeck, Jonathan Corbet, linux-hwmon

sparse warnings: (new ones prefixed by >>)
>> drivers/hwmon/corsair-psu.c:536:82: sparse: sparse: Using plain
   integer as NULL pointer

Fixes: d115b51e0e56 ("hwmon: add Corsair PSU HID controller driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
---
 drivers/hwmon/corsair-psu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/corsair-psu.c b/drivers/hwmon/corsair-psu.c
index 731d5117f9f1..14389fd7afb8 100644
--- a/drivers/hwmon/corsair-psu.c
+++ b/drivers/hwmon/corsair-psu.c
@@ -729,7 +729,7 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id
 	corsairpsu_check_cmd_support(priv);
 
 	priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv,
-							  &corsairpsu_chip_info, 0);
+							  &corsairpsu_chip_info, NULL);
 
 	if (IS_ERR(priv->hwmon_dev)) {
 		ret = PTR_ERR(priv->hwmon_dev);
-- 
2.33.1


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

* Re: [PATCH] hwmon: corsair-psu: fix plain integer used as NULL pointer
  2021-11-13  6:53 [PATCH] hwmon: corsair-psu: fix plain integer used as NULL pointer Wilken Gottwalt
@ 2021-11-14 16:52 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-11-14 16:52 UTC (permalink / raw)
  To: Wilken Gottwalt; +Cc: linux-kernel, Jean Delvare, Jonathan Corbet, linux-hwmon

On Sat, Nov 13, 2021 at 06:53:52AM +0000, Wilken Gottwalt wrote:
> sparse warnings: (new ones prefixed by >>)
> >> drivers/hwmon/corsair-psu.c:536:82: sparse: sparse: Using plain
>    integer as NULL pointer
> 
> Fixes: d115b51e0e56 ("hwmon: add Corsair PSU HID controller driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/corsair-psu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/corsair-psu.c b/drivers/hwmon/corsair-psu.c
> index 731d5117f9f1..14389fd7afb8 100644
> --- a/drivers/hwmon/corsair-psu.c
> +++ b/drivers/hwmon/corsair-psu.c
> @@ -729,7 +729,7 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id
>  	corsairpsu_check_cmd_support(priv);
>  
>  	priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv,
> -							  &corsairpsu_chip_info, 0);
> +							  &corsairpsu_chip_info, NULL);
>  
>  	if (IS_ERR(priv->hwmon_dev)) {
>  		ret = PTR_ERR(priv->hwmon_dev);

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

end of thread, other threads:[~2021-11-14 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-13  6:53 [PATCH] hwmon: corsair-psu: fix plain integer used as NULL pointer Wilken Gottwalt
2021-11-14 16:52 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox