From: Greg KH <gregkh@linuxfoundation.org>
To: Dimitrios Semitsoglou-Tsiapos <dimitrios.semitsoglou@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: comedi: cb_pcidas64: Fixed an if-statement check
Date: Mon, 4 Jun 2012 20:43:18 -0700 [thread overview]
Message-ID: <20120605034318.GA28810@kroah.com> (raw)
In-Reply-To: <1338241905-24327-2-git-send-email-dimitrios.semitsoglou@gmail.com>
On Tue, May 29, 2012 at 12:51:45AM +0300, Dimitrios Semitsoglou-Tsiapos wrote:
> Fixed in if-statemnt responsible for a sanity check inside the
> prep_ao_dma function.
>
> Signed-off-by: Dimitrios Semitsoglou-Tsiapos <dimitrios.semitsoglou@gmail.com>
> ---
> drivers/staging/comedi/drivers/cb_pcidas64.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
> index 6f7fd99..a2e6f96 100644
> --- a/drivers/staging/comedi/drivers/cb_pcidas64.c
> +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
> @@ -3392,8 +3392,8 @@ static int prep_ao_dma(struct comedi_device *dev, const struct comedi_cmd *cmd)
> num_bytes = load_ao_dma_buffer(dev, cmd);
> if (num_bytes == 0)
> return -1;
> - if (num_bytes >= DMA_BUFFER_SIZE) ;
> - load_ao_dma(dev, cmd);
> + if (num_bytes >= DMA_BUFFER_SIZE)
> + load_ao_dma(dev, cmd);
Are you sure about this change? I think someone forgot to include an
error check here, the driver was working with this function always being
called, and now you only do it for the extreme case.
Have you checked it somehow?
thanks,
greg k-h
next prev parent reply other threads:[~2012-06-05 6:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-28 18:28 [PATCH] staging: comedi: cb_pcidas64: Fixed coding style errors and an if-statement Dimitrios Semitsoglou-Tsiapos
2012-05-28 19:31 ` richard -rw- weinberger
2012-05-28 21:51 ` [PATCH 1/2] staging: comedi: cb_pcidas64: Fixed coding style errors Dimitrios Semitsoglou-Tsiapos
2012-05-28 21:51 ` [PATCH 2/2] staging: comedi: cb_pcidas64: Fixed an if-statement check Dimitrios Semitsoglou-Tsiapos
2012-06-05 3:43 ` Greg KH [this message]
2012-06-05 8:17 ` Dimitrios Semitsoglou-Tsiapos
2012-06-05 8:31 ` Dan Carpenter
2012-05-29 6:29 ` [PATCH] staging: comedi: cb_pcidas64: Fixed coding style errors and an if-statement Dan Carpenter
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=20120605034318.GA28810@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=dimitrios.semitsoglou@gmail.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