Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756681Ab0G2KWN (ORCPT ); Thu, 29 Jul 2010 06:22:13 -0400 Received: from cantor.suse.de ([195.135.220.2]:37490 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756320Ab0G2KWL (ORCPT ); Thu, 29 Jul 2010 06:22:11 -0400 Date: Thu, 29 Jul 2010 12:22:10 +0200 Message-ID: From: Takashi Iwai To: Dan Carpenter Cc: Kulikov Vasiliy , kernel-janitors@vger.kernel.org, Andrew Veliath , Jaroslav Kysela , Arnd Bergmann , Tejun Heo , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/10] oss: msnd: check request_region() return value In-Reply-To: <20100728212031.GQ26313@bicker> References: <1280335296-23475-1-git-send-email-segooon@gmail.com> <20100728200002.GP26313@bicker> <20100728212031.GQ26313@bicker> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1237 Lines: 49 At Wed, 28 Jul 2010 23:20:31 +0200, Dan Carpenter wrote: > > On Wed, Jul 28, 2010 at 10:00:02PM +0200, Dan Carpenter wrote: > > This should be -EBUSY as well. The same for "[PATCH 06/10] ALSA: msnd: > > check request_region() return value" > > > > Another way to write that would be: > > > > Gar. I was thinking of request_resource(). request_region() returns a > pointer of course. > > But still the return code should probably be -EBUSY. Resource > conflicts are more likely than allocation failures. Agreed. Kulikov, could you rewrite the patches with -EBUSY? thanks, Takashi > > regards, > dan carpenter > > > - request_region(dev.io, dev.numio, dev.name); > > + err = request_region(dev.io, dev.numio, dev.name); > > + if (err) { > > + free_irq(dev.irq, &dev); > > + return err; > > + } > > > > regards, > > dan carpenter > > > > > + if (request_region(dev.io, dev.numio, dev.name) == NULL) { > > > + free_irq(dev.irq, &dev); > > > + return -ENOMEM; > > > + } > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/