mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 20:32:22 +00:00
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>
This commit is contained in:
parent
08839388d3
commit
7aed13d165
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user