The variable `complement_count` is assigned a value which is again
overwritten in the next statement.
Fix this by removing the first value assigning statement
This issue was reported by Coverity Scan.
Report:
CID
1600790: (#1 of 1): Unused value (UNUSED_VALUE)
assigned_value: Assigning value from length to complement_count here,
but that stored value is overwritten before it can be used.
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20241016075544.4125-1-everestkc@everestkc.com.np
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (!out_data)
return -ENOMEM;
out_data[i++] = 0x0d;
- complement_count = length;
complement_count = length - 1;
complement_count = ~complement_count;
out_data[i++] = complement_count & 0xff;