Staging: most: fix passing a potential null pointer

This patch fixes passing of a potential null pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christian Gromm 2015-07-28 17:16:11 +02:00 committed by Greg Kroah-Hartman
parent 2e4c30458e
commit a11442fe87
1 changed files with 2 additions and 1 deletions

View File

@ -204,7 +204,8 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
}
return actual_len - retval;
error:
most_put_mbo(mbo);
if (mbo)
most_put_mbo(mbo);
return err;
}