mcctrl_perf_num: check "os" argument
Change-Id: I13c8b0c337cac9bbb240667808e871defce34aab
This commit is contained in:
committed by
Masamichi Takagi
parent
239b1b265f
commit
8c0b2ab6ce
@@ -2172,7 +2172,13 @@ static DECLARE_WAIT_QUEUE_HEAD(perfctrlq);
|
|||||||
|
|
||||||
long mcctrl_perf_num(ihk_os_t os, unsigned long arg)
|
long mcctrl_perf_num(ihk_os_t os, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct mcctrl_usrdata *usrdata = ihk_host_os_get_usrdata(os);
|
struct mcctrl_usrdata *usrdata;
|
||||||
|
|
||||||
|
if (!os || ihk_host_validate_os(os)) {
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
usrdata = ihk_host_os_get_usrdata(os);
|
||||||
|
|
||||||
if (!usrdata) {
|
if (!usrdata) {
|
||||||
pr_err("%s: error: mcctrl_usrdata not found\n", __func__);
|
pr_err("%s: error: mcctrl_usrdata not found\n", __func__);
|
||||||
|
|||||||
Reference in New Issue
Block a user