All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarod Wilson <jarod@redhat.com>
To: Andy Walls <awalls@md.metrocast.net>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 5/6] lirc_zilog: error out if buffer read bytes != chunk size
Date: Thu, 17 Mar 2011 09:19:09 -0400	[thread overview]
Message-ID: <20110317131909.GA5941@redhat.com> (raw)
In-Reply-To: <1300320442.2296.25.camel@localhost>

On Wed, Mar 16, 2011 at 08:07:22PM -0400, Andy Walls wrote:
> On Wed, 2011-03-16 at 16:24 -0400, Jarod Wilson wrote:
> > Signed-off-by: Jarod Wilson <jarod@redhat.com>
> > ---
> >  drivers/staging/lirc/lirc_zilog.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c
> > index 407d4b4..5ada643 100644
> > --- a/drivers/staging/lirc/lirc_zilog.c
> > +++ b/drivers/staging/lirc/lirc_zilog.c
> > @@ -950,6 +950,10 @@ static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
> >  				ret = copy_to_user((void *)outbuf+written, buf,
> >  						   rbuf->chunk_size);
> >  				written += rbuf->chunk_size;
> > +			} else {
> > +				zilog_error("Buffer read failed!\n");
> > +				ret = -EIO;
> > +				break;
> 
> No need to break, just let the non-0 ret value drop you out of the while
> loop.

Ah, indeed. I think I mindlessly copied what the tests just a few lines
above were doing without looking at the actual reason for them. I'll
remove that break from the patch here locally.

-- 
Jarod Wilson
jarod@redhat.com


  reply	other threads:[~2011-03-17 13:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 20:24 [PATCH 0/6] media: trivial IR fixes Jarod Wilson
2011-03-16 20:24 ` [PATCH 1/6] docs: fix typo in lirc_device_interface.xml Jarod Wilson
2011-03-16 20:24 ` [PATCH 2/6] imon: add more panel scancode mappings Jarod Wilson
2011-03-16 20:24 ` [PATCH 3/6] ir-kbd-i2c: pass device code w/key in hauppauge case Jarod Wilson
2011-03-16 20:24 ` [PATCH 4/6] lirc: silence some compile warnings Jarod Wilson
2011-03-16 20:24 ` [PATCH 5/6] lirc_zilog: error out if buffer read bytes != chunk size Jarod Wilson
2011-03-17  0:07   ` Andy Walls
2011-03-17 13:19     ` Jarod Wilson [this message]
2011-03-17 15:29       ` Andy Walls
2011-03-17 15:42         ` Jarod Wilson
2011-03-17 16:16           ` Andy Walls
2011-03-17 19:08             ` Jarod Wilson
2011-03-18  0:50               ` Andy Walls
2011-03-22 20:39                 ` Jarod Wilson
2011-03-16 20:24 ` [PATCH 6/6] mceusb: topseed 0x0011 needs gen3 init for tx to work Jarod Wilson

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=20110317131909.GA5941@redhat.com \
    --to=jarod@redhat.com \
    --cc=awalls@md.metrocast.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.