All of lore.kernel.org
 help / color / mirror / Atom feed
* request_region return value check
@ 2013-07-14 17:42 Vivek Subbarao
  2013-07-15 13:20 ` Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vivek Subbarao @ 2013-07-14 17:42 UTC (permalink / raw)
  To: kernel-janitors

There are many places where the return value from request_region is not
checked for null value. This is required right ? I am just checking
before I can send patched fixing them

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: request_region return value check
  2013-07-14 17:42 request_region return value check Vivek Subbarao
@ 2013-07-15 13:20 ` Dan Carpenter
  2013-07-15 17:17 ` Vivek Subbarao
  2013-07-15 20:06 ` Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-07-15 13:20 UTC (permalink / raw)
  To: kernel-janitors

On Sun, Jul 14, 2013 at 11:00:58PM +0530, Vivek Subbarao wrote:
> There are many places where the return value from request_region is not
> checked for null value. This is required right ? I am just checking
> before I can send patched fixing them

Most of the time, but not always.

Sometimes people know it will succeed.  The first one I looked at
in drivers/acpi/acpi_processor.c the caller doesn't care if it
succeeds and there is a comment explaining why.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: request_region return value check
  2013-07-14 17:42 request_region return value check Vivek Subbarao
  2013-07-15 13:20 ` Dan Carpenter
@ 2013-07-15 17:17 ` Vivek Subbarao
  2013-07-15 20:06 ` Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Vivek Subbarao @ 2013-07-15 17:17 UTC (permalink / raw)
  To: kernel-janitors

On Mon, Jul 15, 2013 at 04:20:26PM +0300, Dan Carpenter wrote:
> On Sun, Jul 14, 2013 at 11:00:58PM +0530, Vivek Subbarao wrote:
> > There are many places where the return value from request_region is not
> > checked for null value. This is required right ? I am just checking
> > before I can send patched fixing them
> 
> Most of the time, but not always.
> 
> Sometimes people know it will succeed.  The first one I looked at
> in drivers/acpi/acpi_processor.c the caller doesn't care if it
> succeeds and there is a comment explaining why.
>
I see a lot of calls to request_region in __init calls. For example
there is a call in netwinder-hw.c:wb977_init. Should they be checking
for the return value ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: request_region return value check
  2013-07-14 17:42 request_region return value check Vivek Subbarao
  2013-07-15 13:20 ` Dan Carpenter
  2013-07-15 17:17 ` Vivek Subbarao
@ 2013-07-15 20:06 ` Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-07-15 20:06 UTC (permalink / raw)
  To: kernel-janitors

On Mon, Jul 15, 2013 at 10:35:27PM +0530, Vivek Subbarao wrote:
> On Mon, Jul 15, 2013 at 04:20:26PM +0300, Dan Carpenter wrote:
> > On Sun, Jul 14, 2013 at 11:00:58PM +0530, Vivek Subbarao wrote:
> > > There are many places where the return value from request_region is not
> > > checked for null value. This is required right ? I am just checking
> > > before I can send patched fixing them
> > 
> > Most of the time, but not always.
> > 
> > Sometimes people know it will succeed.  The first one I looked at
> > in drivers/acpi/acpi_processor.c the caller doesn't care if it
> > succeeds and there is a comment explaining why.
> >
> I see a lot of calls to request_region in __init calls. For example
> there is a call in netwinder-hw.c:wb977_init. Should they be checking
> for the return value ?

This is a very well defined specific hardware and they know it won't
fail or if it were to fail then the system couldn't boot anyway so
returning an error code doesn't do any good.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-15 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-14 17:42 request_region return value check Vivek Subbarao
2013-07-15 13:20 ` Dan Carpenter
2013-07-15 17:17 ` Vivek Subbarao
2013-07-15 20:06 ` Dan Carpenter

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.