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:
parent
2e4c30458e
commit
a11442fe87
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue