|
@@ -275,14 +275,12 @@ int read_smbios_string ( struct smbios_structure *structure,
|
275
|
275
|
* smbios_strings struct is constructed so as to
|
276
|
276
|
* always end on a string boundary.
|
277
|
277
|
*/
|
278
|
|
- string_len = strlen_user ( smbios.address,
|
279
|
|
- ( structure->offset + offset ) );
|
|
278
|
+ string_len = strlen_user ( smbios.address, offset );
|
280
|
279
|
if ( --index == 0 ) {
|
281
|
280
|
/* Copy string, truncating as necessary. */
|
282
|
281
|
if ( len > string_len )
|
283
|
282
|
len = string_len;
|
284
|
|
- copy_from_user ( data, smbios.address,
|
285
|
|
- ( structure->offset + offset ), len );
|
|
283
|
+ copy_from_user ( data, smbios.address, offset, len );
|
286
|
284
|
return string_len;
|
287
|
285
|
}
|
288
|
286
|
}
|