mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
UPSTREAM: usb: gadget: f_uac2: remove redundant assignments to pointer i_feature
Pointer i_feature is being initialized with a value and then immediately
re-assigned a new value in the next statement. Fix this by replacing the
the redundant initialization with the following assigned value.
Change-Id: I1cf2dd348b049a0dcb902ea674386daec68ee07e
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Unused value")
Link: https://lore.kernel.org/r/20210804125907.111654-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 59e477af7b)
This commit is contained in:
committed by
Tao Huang
parent
7cff8ea0d7
commit
6c4eefb07f
@@ -990,17 +990,13 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
|
||||
std_as_in_if1_desc.iInterface = us[STR_AS_IN_ALT1].id;
|
||||
|
||||
if (FUOUT_EN(uac2_opts)) {
|
||||
u8 *i_feature = (u8 *)out_feature_unit_desc;
|
||||
|
||||
i_feature = (u8 *)out_feature_unit_desc +
|
||||
out_feature_unit_desc->bLength - 1;
|
||||
u8 *i_feature = (u8 *)out_feature_unit_desc +
|
||||
out_feature_unit_desc->bLength - 1;
|
||||
*i_feature = us[STR_FU_OUT].id;
|
||||
}
|
||||
if (FUIN_EN(uac2_opts)) {
|
||||
u8 *i_feature = (u8 *)in_feature_unit_desc;
|
||||
|
||||
i_feature = (u8 *)in_feature_unit_desc +
|
||||
in_feature_unit_desc->bLength - 1;
|
||||
u8 *i_feature = (u8 *)in_feature_unit_desc +
|
||||
in_feature_unit_desc->bLength - 1;
|
||||
*i_feature = us[STR_FU_IN].id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user