diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-02-02 22:34:49 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 14:46:16 +0100 |
commit | 526eb7a254e9ffabfe567438dc091ad5ebb5c7ee (patch) | |
tree | f6655901d33cee66a5c1eb6206b8ab1e9d5a6157 /drivers/leds/leds-aat1290.c | |
parent | 5cd9f229dd3e4980580406f5a47230ec5ee836d7 (diff) |
staging: most: cdev: add missing check for cdev_add failure
[ Upstream commit 5ae890780e1b4d08f2c0c5d4ea96fc3928fc0ee9 ]
Currently the call to cdev_add is missing a check for failure. Fix this by
checking for failure and exiting via a new error path that ensures the
allocated comp_channel struct is kfree'd.
Detected by CoverityScan, CID#1462359 ("Unchecked return value")
Fixes: 9bc79bbcd0c5 ("Staging: most: add MOST driver's aim-cdev module")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/leds/leds-aat1290.c')
0 files changed, 0 insertions, 0 deletions