Skip to content

Commit

Permalink
ACER: Fix up sparse warning
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Marek Vasut authored and Matthew Garrett committed Jul 28, 2012
1 parent 3766054 commit 24237c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 24237c4

Please sign in to comment.