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-29 13:43:15 -07:00
committed by Greg Kroah-Hartman
parent 2e4c30458e
commit a11442fe87
+2 -1
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;
}