diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2015-07-28 18:16:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-29 23:43:15 +0300 |
commit | a11442fe87d63994816cf2edde4450410df397af (patch) | |
tree | ea0edba6d8a1f118a8eaff2712b89bc85b6c833c /drivers/staging/most/aim-cdev | |
parent | 2e4c30458e31e5f6487d1393254f2ab347cfb02c (diff) | |
download | linux-a11442fe87d63994816cf2edde4450410df397af.tar.xz |
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>
Diffstat (limited to 'drivers/staging/most/aim-cdev')
-rw-r--r-- | drivers/staging/most/aim-cdev/cdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index cfc32dff6512..252a17cf153c 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -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; } |