All of lore.kernel.org
 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>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] media: hdpvr: don't check number of messages in the driver
Date: Sun, 20 May 2018 08:50:36 +0200	[thread overview]
Message-ID: <20180520065039.7989-6-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/usb/hdpvr/hdpvr-i2c.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c b/drivers/media/usb/hdpvr/hdpvr-i2c.c
index 4720d79b0282..c97dcf981b3f 100644
--- a/drivers/media/usb/hdpvr/hdpvr-i2c.c
+++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c
@@ -117,9 +117,6 @@ static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs,
 	struct hdpvr_device *dev = i2c_get_adapdata(i2c_adapter);
 	int retval = 0, addr;
 
-	if (num <= 0)
-		return 0;
-
 	mutex_lock(&dev->i2c_mutex);
 
 	addr = msgs[0].addr << 1;
-- 
2.11.0

  parent reply	other threads:[~2018-05-20  6:50 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 ` [PATCH 1/7] media: netup_unidvb: don't check number of messages in the driver Wolfram Sang
2018-05-20  6:50 ` [PATCH 2/7] media: si4713: " 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 ` Wolfram Sang [this message]
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-6-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=hverkuil@xs4all.nl \
    --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 \
    /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.