wcd9335: fix a incorrect use of kstrndup()

In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().

Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Gen Zhang 2019-05-29 09:53:05 +08:00 • committed by Mark Brown
commit a549881139
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0