X86 platform drivers
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jprvita@gmail.com
Cc: platform-driver-x86@vger.kernel.org,
	acpi4asus-user@lists.sourceforge.net
Subject: [bug report] asus-wireless: Toggle airplane mode LED
Date: Sat, 18 Feb 2017 23:30:59 +0300	[thread overview]
Message-ID: <20170218203059.GA23566@mwanda> (raw)

Hello João Paulo Rechi Vita,

The patch 2c1a49c96123: "asus-wireless: Toggle airplane mode LED"
from Jun 13, 2016, leads to the following static checker warning:

	drivers/platform/x86/asus-wireless.c:54 asus_wireless_method()
	error: uninitialized symbol 'ret'.

drivers/platform/x86/asus-wireless.c
    33  static u64 asus_wireless_method(acpi_handle handle, const char *method,
    34                                  int param)
    35  {
    36          struct acpi_object_list p;
    37          union acpi_object obj;
    38          acpi_status s;
    39          u64 ret;
    40  
    41          acpi_handle_debug(handle, "Evaluating method %s, parameter %#x\n",
    42                            method, param);
    43          obj.type = ACPI_TYPE_INTEGER;
    44          obj.integer.value = param;
    45          p.count = 1;
    46          p.pointer = &obj;
    47  
    48          s = acpi_evaluate_integer(handle, (acpi_string) method, &p, &ret);

"ret" isn't necessarily initialized on a couple error paths through this
function.

    49          if (ACPI_FAILURE(s))
    50                  acpi_handle_err(handle,
    51                                  "Failed to eval method %s, param %#x (%d)\n",
    52                                  method, param, s);
    53          acpi_handle_debug(handle, "%s returned %#x\n", method, (uint) ret);
    54          return ret;
    55  }

regards,
dan carpenter

             reply	other threads:[~2017-02-18 20:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18 20:30 Dan Carpenter [this message]
2017-02-20 14:19 ` [bug report] asus-wireless: Toggle airplane mode LED João Paulo Rechi Vita
2017-02-20 19:22 ` João Paulo Rechi Vita
2017-02-21 13:27   ` Dan Carpenter

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=20170218203059.GA23566@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=jprvita@gmail.com \
    --cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox