X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH 1/2] ACER: Fix up sparse warning
@ 2012-07-04 23:30 Marek Vasut
  2012-07-04 23:30 ` [PATCH 2/2] ACER: Fix Smatch double-free issue Marek Vasut
  2012-07-06 10:22 ` [PATCH 1/2] ACER: Fix up sparse warning joeyli
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Vasut @ 2012-07-04 23:30 UTC (permalink / raw)
  To: platform-driver-x86; +Cc: Marek Vasut, Matthew Garrett, Fengguang Wu, joeyli

drivers/platform/x86/acer-wmi.c:1836:18: sparse: Using plain integer as NULL pointer

drivers/platform/x86/acer-wmi.c:1836:
  1833
  1834          BUG_ON(!name || !ah);
  1835
> 1836          handle = 0;
  1837          status = acpi_get_devices(prop, acer_wmi_get_handle_cb,
  1838                                          (void *)name, &handle);
  1839

Reported-by: Fengguang Wu <wfg@linux.intel.com>

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: joeyli <jlee@suse.com>
---
 drivers/platform/x86/acer-wmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 175809d..ae969fd 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -1833,7 +1833,7 @@ static int __init acer_wmi_get_handle(const char *name, const char *prop,
 
 	BUG_ON(!name || !ah);
 
-	handle = 0;
+	handle = NULL;
 	status = acpi_get_devices(prop, acer_wmi_get_handle_cb,
 					(void *)name, &handle);
 
-- 
1.7.10

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

end of thread, other threads:[~2012-07-06 10:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-04 23:30 [PATCH 1/2] ACER: Fix up sparse warning Marek Vasut
2012-07-04 23:30 ` [PATCH 2/2] ACER: Fix Smatch double-free issue Marek Vasut
2012-07-06 10:22   ` joeyli
2012-07-06 10:22 ` [PATCH 1/2] ACER: Fix up sparse warning joeyli

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