lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100903163438.GB2200@core.coreip.homeip.net>
Date:	Fri, 3 Sep 2010 09:34:39 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Hemanth V <hemanthv@...com>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: Re: [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver

Hi Hemanth,

On Fri, Sep 03, 2010 at 04:02:11PM +0530, Hemanth V wrote:
> >
> >
> >Do not like repeated release of resources in main and error path... Can
> >we do it like:
> >
> >...
> >disable_irq();
> >error = cma3000_set(data, CMA3000_CTRL, ctrl, "ctrl");
> >if (!error) {
> >/* Settling time delay required after mode change */
> >msleep(CMA3000_SETDELAY);
> >}
> >enable_irq();
> >out:
> >mutex_unlock();
> >return error ? error : count;
> 
> I am thinking I can just add the below statement, and should be able to
> remove repeated release.
> 
> return error ? error : count;
> 

That would make us sleep for CMA3000_SETDELAY even in case of failure...
... But that should be OK.

> >>+
> >>+ if (data->client->irq) {
> >>+ ret = request_threaded_irq(data->client->irq, NULL,
> >>+ cma3000_thread_irq,
> >>+ irqflags | IRQF_ONESHOT,
> >>+ data->client->name, data);
> >>+
> >>+ if (ret < 0) {
> >>+ dev_err(&data->client->dev,
> >>+ "request_threaded_irq failed\n");
> >>+ goto err_op1_failed;
> >>+ }
> >>+ }
> >
> >What is the utility of the driver when there is no IRQ line?
> 
> Not sure I fully understand your comments.
> Currently probe would return a failure.
> 

You have a check for data->client->irq != 0 and finish probe() with
success in case it is 0. The question is what is the use of the
device/driver combo in case when data->client->irq == 0?

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ