All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Gromm <christian.gromm@microchip.com>
To: <gregkh@linuxfoundation.org>
Cc: Christian Gromm <christian.gromm@microchip.com>,
	driverdev-devel@linuxdriverproject.org
Subject: [PATCH 5/5] staging: most: sound: remove overcautious argument checking
Date: Tue, 23 Jun 2020 17:07:35 +0200	[thread overview]
Message-ID: <1592924855-25569-6-git-send-email-christian.gromm@microchip.com> (raw)
In-Reply-To: <1592924855-25569-1-git-send-email-christian.gromm@microchip.com>

The interface pointer passed to a component API function cannot be NULL.
This patch removes the unnecessary sanity check of this argument.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/sound/sound.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c
index 7c56cdb..8a449ab 100644
--- a/drivers/staging/most/sound/sound.c
+++ b/drivers/staging/most/sound/sound.c
@@ -531,9 +531,6 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
 	char *sample_res;
 	char arg_list_cpy[STRING_SIZE];
 
-	if (!iface)
-		return -EINVAL;
-
 	if (cfg->data_type != MOST_CH_SYNC) {
 		pr_err("Incompatible channel type\n");
 		return -EINVAL;
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

      parent reply	other threads:[~2020-06-23 15:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 15:07 [PATCH 0/5] staging: most: sound: clean up Christian Gromm
2020-06-23 15:07 ` [PATCH 1/5] staging: most: sound: remove noisy log messages Christian Gromm
2020-06-23 15:07 ` [PATCH 2/5] staging: most: sound: fix error path Christian Gromm
2020-06-23 15:07 ` [PATCH 3/5] staging: most: sound: fix return values Christian Gromm
2020-06-23 15:07 ` [PATCH 4/5] staging: most: sound: fix white spaces Christian Gromm
2020-06-23 15:07 ` Christian Gromm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1592924855-25569-6-git-send-email-christian.gromm@microchip.com \
    --to=christian.gromm@microchip.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.