Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ddc5c9a3 authored by Pan Bian's avatar Pan Bian Committed by Greg Kroah-Hartman
Browse files

misc: set error code when devm_kstrdup fails

In function sram_reserve_regions(), the value of return variable ret
should be negative on failures. However, the value of ret may be 0 even
if the call to devm_kstrdup() returns a NULL pointer. This patch
explicitly assigns "-ENOMEM" to ret on the path that devm_kstrdup()
fails.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188651



Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d77044d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment