mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
UPSTREAM: rpmsg: Constify local variable in field store macro
commit e5f89131a06142e91073b6959d91cea73861d40e upstream. Memory pointed by variable 'old' in field store macro is not modified, so it can be made a pointer to const. Bug: 295334746 Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220419113435.246203-12-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 5c0da71871d3ac3f96d37067bf1a0ba9c25c2c72) Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: If5610892601368e855ec1be57e01dbbe06ae046a
This commit is contained in:
parent
2069521c81
commit
d0dadc2667
1 changed files with 2 additions and 1 deletions
|
|
@ -368,7 +368,8 @@ field##_store(struct device *dev, struct device_attribute *attr, \
|
|||
const char *buf, size_t sz) \
|
||||
{ \
|
||||
struct rpmsg_device *rpdev = to_rpmsg_device(dev); \
|
||||
char *new, *old; \
|
||||
const char *old; \
|
||||
char *new; \
|
||||
\
|
||||
new = kstrndup(buf, sz, GFP_KERNEL); \
|
||||
if (!new) \
|
||||
|
|
|
|||
Loading…
Reference in a new issue