From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mundt Subject: Re: [PATCH RFC] sh: maple: Add support for SEGA Dreamcast VMU and clean up maple bus driver (3/3) Date: Thu, 29 Jan 2009 11:57:54 +0900 Message-ID: <20090129025754.GC31096@linux-sh.org> References: <1233186456.6734.16.camel@localhost.localdomain> <1233187069.6734.21.camel@localhost.localdomain> <1233187750.6734.27.camel@localhost.localdomain> <1233188287.6734.32.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mta23.gyao.ne.jp ([125.63.38.249]:42310 "EHLO mx.gate01.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751364AbZA2DBF (ORCPT ); Wed, 28 Jan 2009 22:01:05 -0500 Content-Disposition: inline In-Reply-To: <1233188287.6734.32.camel@localhost.localdomain> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Adrian McMenamin Cc: Greg KH , Dmitry Torokhov , dwmw2 , linux-sh , LKML , linux-input , MTD On Thu, Jan 29, 2009 at 12:18:07AM +0000, Adrian McMenamin wrote: > + if (!(mdev->function & MAPLE_FUNC_KEYBOARD)) { > + error = EINVAL; > + goto fail; > + } > What is this all about? If the function doesn't match, you should never enter the probe routine in the first place. The bus code should already get this right. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta23.gyao.ne.jp ([125.63.38.249] helo=mx.gate01.com) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1LSN9I-0007iu-7U for linux-mtd@lists.infradead.org; Thu, 29 Jan 2009 03:01:03 +0000 Date: Thu, 29 Jan 2009 11:57:54 +0900 From: Paul Mundt To: Adrian McMenamin Subject: Re: [PATCH RFC] sh: maple: Add support for SEGA Dreamcast VMU and clean up maple bus driver (3/3) Message-ID: <20090129025754.GC31096@linux-sh.org> References: <1233186456.6734.16.camel@localhost.localdomain> <1233187069.6734.21.camel@localhost.localdomain> <1233187750.6734.27.camel@localhost.localdomain> <1233188287.6734.32.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1233188287.6734.32.camel@localhost.localdomain> Cc: linux-sh , Greg KH , Dmitry Torokhov , LKML , MTD , linux-input , dwmw2 List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Jan 29, 2009 at 12:18:07AM +0000, Adrian McMenamin wrote: > + if (!(mdev->function & MAPLE_FUNC_KEYBOARD)) { > + error = EINVAL; > + goto fail; > + } > What is this all about? If the function doesn't match, you should never enter the probe routine in the first place. The bus code should already get this right. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mundt Date: Thu, 29 Jan 2009 02:57:54 +0000 Subject: Re: [PATCH RFC] sh: maple: Add support for SEGA Dreamcast VMU and clean up maple bus driver (3/3) Message-Id: <20090129025754.GC31096@linux-sh.org> List-Id: References: <1233186456.6734.16.camel@localhost.localdomain> <1233187069.6734.21.camel@localhost.localdomain> <1233187750.6734.27.camel@localhost.localdomain> <1233188287.6734.32.camel@localhost.localdomain> In-Reply-To: <1233188287.6734.32.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Adrian McMenamin Cc: Greg KH , Dmitry Torokhov , dwmw2 , linux-sh , LKML , linux-input , MTD On Thu, Jan 29, 2009 at 12:18:07AM +0000, Adrian McMenamin wrote: > + if (!(mdev->function & MAPLE_FUNC_KEYBOARD)) { > + error = EINVAL; > + goto fail; > + } > What is this all about? If the function doesn't match, you should never enter the probe routine in the first place. The bus code should already get this right.