aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2021-08-04 13:59:07 +0100
committerGreg Kroah-Hartman <[email protected]>2021-08-05 12:31:41 +0200
commit59e477af7b1a2a0d1d4c934f9cfda7b753341f12 (patch)
treec44c35bed4e147286edbc1d9d5f0db96ccbe9a18
parente21dd90eb86488fb2689c766311eb6fce98b2eb7 (diff)
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. Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/gadget/function/f_uac2.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
index b9edc6787f79..3c34995276e7 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -970,17 +970,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;
}