thunderbolt: Remove superfluous check

The key size is tested by hex2bin() already (as '\0' isn't an hex digit)

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Bernat, Yehezkel 2017-08-15 08:19:01 +03:00 committed by Greg Kroah-Hartman
parent 0875957e4b
commit 8fdd6ab361
1 changed files with 0 additions and 3 deletions

View File

@ -808,9 +808,6 @@ static ssize_t key_store(struct device *dev, struct device_attribute *attr,
u8 key[TB_SWITCH_KEY_SIZE];
ssize_t ret = count;
if (count < 64)
return -EINVAL;
if (hex2bin(key, buf, sizeof(key)))
return -EINVAL;