diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2020-06-22 10:48:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-25 15:40:28 +0200 |
commit | 7aed13d1653678137ef291ced45158eaa8c39e96 (patch) | |
tree | 10bde79af09d18a8b78baede8ed713154f261683 /drivers/staging/most | |
parent | 08839388d31ba85d550f60e8e4bc3956b0586e86 (diff) |
staging: most: cdev: remove overcautious parameter checking
The interface pointer passed to a component API function cannot be NULL.
This patch removes unnecessary sanity checks of the pointer.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1592815695-19305-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/cdev/cdev.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c index 394c7621cb51..9fc84fae21fd 100644 --- a/drivers/staging/most/cdev/cdev.c +++ b/drivers/staging/most/cdev/cdev.c @@ -324,9 +324,6 @@ static int comp_disconnect_channel(struct most_interface *iface, int channel_id) { struct comp_channel *c; - if (!iface) - return -EINVAL; - c = get_channel(iface, channel_id); if (!c) return -ENXIO; @@ -391,9 +388,6 @@ static int comp_tx_completion(struct most_interface *iface, int channel_id) { struct comp_channel *c; - if (!iface) - return -EINVAL; - c = get_channel(iface, channel_id); if (!c) return -ENXIO; @@ -426,7 +420,7 @@ static int comp_probe(struct most_interface *iface, int channel_id, int retval; int current_minor; - if ((!iface) || (!cfg) || (!name)) + if ((!cfg) || (!name)) return -EINVAL; c = get_channel(iface, channel_id); |