lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Nov 2016 15:52:25 +0100
From:   Pavel Machek <pavel@....cz>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Ramiro Oliveira <Ramiro.Oliveira@...opsys.com>, mchehab@...nel.org,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        robh+dt@...nel.org, devicetree@...r.kernel.org,
        davem@...emloft.net, gregkh@...uxfoundation.org,
        geert+renesas@...der.be, akpm@...ux-foundation.org,
        hverkuil@...all.nl, dheitmueller@...nellabs.com,
        slongerbeam@...il.com, lars@...afoo.de, robert.jarzmik@...e.fr,
        pali.rohar@...il.com, sakari.ailus@...ux.intel.com,
        mark.rutland@....com, CARLOS.PALMINHA@...opsys.com
Subject: Re: [PATCH v4 2/2] Add support for OV5647 sensor

On Tue 2016-11-15 05:50:32, Guenter Roeck wrote:
> On 11/15/2016 04:10 AM, Pavel Machek wrote:
> >Hi!
> >
> >>Add support for OV5647 sensor.
> >>
> >
> >>+static int ov5647_write(struct v4l2_subdev *sd, u16 reg, u8 val)
> >>+{
> >>+	int ret;
> >>+	unsigned char data[3] = { reg >> 8, reg & 0xff, val};
> >>+	struct i2c_client *client = v4l2_get_subdevdata(sd);
> >>+
> >>+	ret = i2c_master_send(client, data, 3);
> >>+	if (ret != 3) {
> >>+		dev_dbg(&client->dev, "%s: i2c write error, reg: %x\n",
> >>+				__func__, reg);
> >>+		return ret < 0 ? ret : -EIO;
> >>+	}
> >>+	return 0;
> >>+}
> >
> >Sorry, this is wrong. It should something <0 any time error is detected.
> >
> 
> It seems to me that it does return a value < 0 each time an error is detected.

Yep, you are right, sorry, I misparsed the code.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ