]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: PCC: handle parse error
authorDavid Arcari <darcari@redhat.com>
Mon, 27 Aug 2018 19:19:08 +0000 (15:19 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 10 Sep 2018 10:54:02 +0000 (12:54 +0200)
commit82483f0e2938289c71ec421bd65645044bd040b3
tree35c570aa7256f5f6aa8e3a2a4af2690819d79c00
parentd9cd171e36a0a756e2d44073ffb1adf94fb7ed60
mailbox: PCC: handle parse error

acpi_pcc_probe() calls acpi_table_parse_entries_array() but fails
to check for an error return.  This in turn can result in calling
kcalloc() with a negative count as well as emitting the following
misleading erorr message:

[    2.642015] Could not allocate space for PCC mbox channels

Fixes: 7ea3dbbec726 (mailbox: PCC: erroneous error message when parsing ACPI PCCT)
Signed-off-by: David Arcari <darcari@redhat.com>
Reviewed-by: Al Stone <ahs3@redhat.com>
Cc: 4.18+ <stable@vger.kernel.org> # 4.18+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/mailbox/pcc.c