Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fdd6ab3 authored by Bernat, Yehezkel's avatar Bernat, Yehezkel Committed by Greg Kroah-Hartman
Browse files

thunderbolt: Remove superfluous check



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

Suggested-by: default avatarAndy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: default avatarYehezkel Bernat <yehezkel.bernat@intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0875957e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;