mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: leejr@linuxsoftwareconsultants.com (Lee Brown)
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch]  Does this correct  a bug in ibmcam.c?
Date: Mon, 12 Mar 2001 19:24:27 +0000 (GMT)	[thread overview]
Message-ID: <E14cXvi-0002Sv-00@the-village.bc.nu> (raw)
In-Reply-To: <01031203541300.02643@darkstar> from "Lee Brown" at Mar 12, 2001 03:52:02 AM

> +			int chan;
>  
> -			if (copy_from_user(&v, arg, sizeof(v)))
> -				return -EFAULT;
> -			if ((v < 0) || (v >= 3)) /* 3 grades of lighting conditions */
> -				return -EINVAL;
> -			if (v != ibmcam->vchan.channel) {
> -				ibmcam->vchan.channel = v;
> +			chan = (int)arg;
> +		
> +			if ((chan < 0) || (chan >= 3)) /* 3 grades of lighting conditions */ 
> +			 	return -EINVAL;			
> +	
> +			if (chan != ibmcam->vchan.channel) { 	
> +				ibmcam->vchan.channel = chan; 			
>  				usb_ibmcam_change_lighting_conditions(ibmcam);
> -			}
> + 			}
>  			return 0;
>  		}

This change is wrong. I think you are calling the ioctl wrongly


      reply	other threads:[~2001-03-12 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-12  8:52 Lee Brown
2001-03-12 19:24 ` Alan Cox [this message]

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=E14cXvi-0002Sv-00@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=leejr@linuxsoftwareconsultants.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®