From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: video4linux-list@redhat.com
Subject: Re: [PATCH] mt9m111: style cleanup
Date: Wed, 13 Aug 2008 18:38:18 +0200 [thread overview]
Message-ID: <87skt86fb9.fsf@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0808131322340.3884@axis700.grange> (Guennadi Liakhovetski's message of "Wed\, 13 Aug 2008 13\:35\:19 +0200 \(CEST\)")
Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:
> Fix a typo in Kconfig, simplify error checking, further minor cleanup.
>
> Signed-off-by: Guennadi Liakhovetski <g.iakhovetski@gmx.de>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
But ...
> @@ -778,15 +776,13 @@ static int mt9m111_init(struct soc_camera_device *icd)
>
> mt9m111->context = HIGHPOWER;
> ret = mt9m111_enable(icd);
> - if (ret >= 0)
> + if (!ret) {
> mt9m111_reset(icd);
> - if (ret >= 0)
> mt9m111_set_context(icd, mt9m111->context);
> - if (ret >= 0)
> mt9m111_set_autoexposure(icd, mt9m111->autoexposure);
> - if (ret < 0)
> + } else
> dev_err(&icd->dev, "mt9m111 init failed: %d\n", ret);
> - return ret ? -EIO : 0;
> + return ret;
> }
You changed the fault path here : you don't check if every call succeeds. I
don't think it's very important though ... I certainly don't care that much.
Plus one style issue : IIRC, if there are braces on the if statement, there must
be braces on the else statement, even if it's a one line else block =>
+ } else {
dev_err(&icd->dev, "mt9m111 init failed: %d\n", ret);
+ }
--
Robert
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-08-13 16:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-02 10:58 [RFC] soc_camera: endianness between camera and its host Robert Jarzmik
2008-08-02 20:09 ` Guennadi Liakhovetski
2008-08-02 23:38 ` Robert Jarzmik
2008-08-12 14:59 ` Guennadi Liakhovetski
2008-08-13 8:37 ` robert.jarzmik
2008-08-13 9:10 ` Guennadi Liakhovetski
2008-08-13 10:03 ` robert.jarzmik
2008-08-13 11:35 ` [PATCH] mt9m111: style cleanup Guennadi Liakhovetski
2008-08-13 16:38 ` Robert Jarzmik [this message]
2008-08-13 16:47 ` Guennadi Liakhovetski
2008-08-13 16:54 ` Robert Jarzmik
2008-08-13 17:12 ` Guennadi Liakhovetski
2008-08-13 17:20 ` Robert Jarzmik
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=87skt86fb9.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=g.liakhovetski@gmx.de \
--cc=video4linux-list@redhat.com \
/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