]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ACPI: MRRM: Silence error code static checker warning
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 27 May 2025 05:54:04 +0000 (08:54 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 May 2025 13:22:56 +0000 (15:22 +0200)
commit9375e5e3557bf98e9c293aa32a9d2985eed16b5e
tree6e1d5fd2b4b1559b5bfebf6e080ef498ace9b4af
parent059717c2ba1f745f35f4bbb8991e408c12031f1e
ACPI: MRRM: Silence error code static checker warning

The error code is not set correctly on if kasprintf() fails.  On the
first iteration it would return -EINVAL and subsequent iterations
would return success.  Set it to -ENOMEM.

In real life, this allocation will not fail and if it did the system
will not boot so this change is mostly to silence static checker warnings
more than anything else.

Fixes: 04f53540f791 ("ACPI: MRRM: Add /sys files to describe memory ranges")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aDVTfEm-Jch7FuHG@stanley.mountain
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_mrrm.c