Message ID | 20171011143203.47rm2ctbzc5apj5f@pd.tnic (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c index d3a50f1f737e..ed5a7404b5a5 100644 --- a/drivers/crypto/ccp/psp-dev.c +++ b/drivers/crypto/ccp/psp-dev.c @@ -192,19 +192,19 @@ static long sev_ioctl(struct file *file, unsigned int ioctl, unsigned long arg) return -EINVAL; switch (input.cmd) { - - case SEV_FACTORY_RESET: { - ret = sev_handle_cmd(SEV_CMD_FACTORY_RESET, 0, &input.error); + case SEV_FACTORY_RESET: + ret = sev_do_cmd(SEV_CMD_FACTORY_RESET, 0, &input.error); break; - } + default: ret = -EINVAL; - break; + goto out; } if (copy_to_user(argp, &input, sizeof(struct sev_issue_cmd))) ret = -EFAULT; +out: return ret; }