drivers/seclink: remove unreachable statement
When key command is the SECLINKIOC_REMOVEKEY, it checks the res variable twice.
if (!res) {
if (res == -1) {
But second res conditional can't be true always, because res is zero by
previous conditional.
This commit removes unreachable statement.
@@ -120,12 +120,8 @@ int hd_handle_key_request(int cmd, unsigned long arg, void *lower)
break;
case SECLINKIOC_REMOVEKEY:
if (!res) {
- if (res == -1) {
- req->res = HAL_INVALID_SLOT_RANGE;
- } else {
_unset_key_slot(info->key_idx);
req->res = se->ops->remove_key(info->mode, info->key_idx);
- }
} else {
req->res = HAL_EMPTY_SLOT;
}
