From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: Jim Paris <jim@jtan.com>
Cc: video4linux-list@redhat.com
Subject: Re: gspca: fix vidioc_s_jpegcomp locking
Date: Tue, 09 Dec 2008 22:59:53 +0100 [thread overview]
Message-ID: <493EEA59.2040406@hhs.nl> (raw)
In-Reply-To: <20081209215837.GA24743@psychosis.jim.sh>
Jim Paris wrote:
> This locking looked wrong.
>
Hi,
I appreciate the effort, but please do not send patches just because something
looks wrong. The original code is perfectly fine. It check if the sub driver
supports set_jcomp at all, this check does not need locking.
Regards,
Hans
> -jim
>
> --
>
> gspca: fix vidioc_s_jpegcomp locking
>
> Signed-off-by: Jim Paris <jim@jtan.com>
>
> diff -r b50857fea6df linux/drivers/media/video/gspca/gspca.c
> --- a/linux/drivers/media/video/gspca/gspca.c Tue Dec 09 16:20:31 2008 -0500
> +++ b/linux/drivers/media/video/gspca/gspca.c Tue Dec 09 16:55:39 2008 -0500
> @@ -1320,10 +1320,10 @@
> struct gspca_dev *gspca_dev = priv;
> int ret;
>
> + if (!gspca_dev->sd_desc->set_jcomp)
> + return -EINVAL;
> if (mutex_lock_interruptible(&gspca_dev->usb_lock))
> return -ERESTARTSYS;
> - if (!gspca_dev->sd_desc->set_jcomp)
> - return -EINVAL;
> ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp);
> mutex_unlock(&gspca_dev->usb_lock);
> return ret;
>
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list
>
--
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-12-09 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 21:58 gspca: fix vidioc_s_jpegcomp locking Jim Paris
2008-12-09 21:59 ` Hans de Goede [this message]
2008-12-09 22:08 ` Jim Paris
2008-12-10 8:25 ` Hans de Goede
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=493EEA59.2040406@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=jim@jtan.com \
--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