linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Sommer <saschasommer@freenet.de>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: [PATCH] em28xx: Fix: I2C_CLK write error message checks wrong return code
Date: Sun, 08 Jan 2012 21:19:30 +0100	[thread overview]
Message-ID: <4F09FA52.7020606@freenet.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

Hello,

it looks like the return value check that is done after setting the I2C 
speed checks the wrong return code.
Attached patch fixes this problem.

Regards

Sascha


[-- Attachment #2: em28xx_check_correct_return_code_after_register_write.patch --]
[-- Type: text/x-patch, Size: 744 bytes --]

Fix: I2C_CLK write error message checks wrong return code

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>

diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 897a432..349e674 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -3015,7 +3015,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
 
 	if (!dev->board.is_em2800) {
 		/* Resets I2C speed */
-		em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
+		retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
 		if (retval < 0) {
 			em28xx_errdev("%s: em28xx_write_reg failed!"
 				      " retval [%d]\n",

                 reply	other threads:[~2012-01-07 20:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4F09FA52.7020606@freenet.de \
    --to=saschasommer@freenet.de \
    --cc=linux-media@vger.kernel.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 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).