linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: linux-i2c@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>,
	Sergey Kozlov <serjk@netup.ru>, Abylay Ospan <aospan@netup.ru>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/7] media: netup_unidvb: don't check number of messages in the driver
Date: Sun, 20 May 2018 08:50:32 +0200	[thread overview]
Message-ID: <20180520065039.7989-2-wsa@the-dreams.de> (raw)
In-Reply-To: <20180520065039.7989-1-wsa@the-dreams.de>

Since commit 1eace8344c02 ("i2c: add param sanity check to
i2c_transfer()"), the I2C core does this check now. We can remove it
from drivers.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---

Only build tested.

 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
index b13e319d24b7..5f1613aec93c 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
@@ -214,11 +214,6 @@ static int netup_i2c_xfer(struct i2c_adapter *adap,
 	struct netup_i2c *i2c = i2c_get_adapdata(adap);
 	u16 reg;
 
-	if (num <= 0) {
-		dev_dbg(i2c->adap.dev.parent,
-			"%s(): num == %d\n", __func__, num);
-		return -EINVAL;
-	}
 	spin_lock_irqsave(&i2c->lock, flags);
 	if (i2c->state != STATE_DONE) {
 		dev_dbg(i2c->adap.dev.parent,
-- 
2.11.0

  reply	other threads:[~2018-05-20  6:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-20  6:50 [PATCH 0/7] don't check number of I2C messages in drivers Wolfram Sang
2018-05-20  6:50 ` Wolfram Sang [this message]
2018-05-20  6:50 ` [PATCH 2/7] media: si4713: don't check number of messages in the driver Wolfram Sang
2018-05-20  6:50 ` [PATCH 3/7] media: cx231xx: " Wolfram Sang
2018-05-20  6:50 ` [PATCH 4/7] media: em28xx: " Wolfram Sang
2018-05-20  6:50 ` [PATCH 5/7] media: hdpvr: " Wolfram Sang
2018-05-20  6:50 ` [PATCH 6/7] media: tm6000: " Wolfram Sang
2018-05-20  6:50 ` [PATCH 7/7] media: dvb-usb: " Wolfram Sang

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=20180520065039.7989-2-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=aospan@netup.ru \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=peda@axentia.se \
    --cc=serjk@netup.ru \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).