From patchwork Wed May 5 19:31:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3319 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Wed, 05 May 2010 19:31:42 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Wed, 05 May 2010 16:31:59 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1O9kJq-0007hm-6N; Wed, 05 May 2010 19:31:42 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758130Ab0EETbi (ORCPT + 1 other); Wed, 5 May 2010 15:31:38 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:39527 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757494Ab0EETbh (ORCPT ); Wed, 5 May 2010 15:31:37 -0400 Received: by fxm10 with SMTP id 10so4561153fxm.19 for ; Wed, 05 May 2010 12:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=sLTXnGvoH+KmRHDbChEmTuu/JX9S3Hiq+yC7RNNkoWg=; b=stqYZlWE+j17QzbsMCIGih3jLwbMl4+HQ6DpkdZw+U0B8fmM8kB+G0PiS8RVli5mfE KKBvoAM80JG6AiSekWU36VZY3eoXL2zTfT27KpfNDA+qJ90hbNhXcZJBSBzmSSrr12C1 +BfrUiG9dEH24dGHULUSa6GivDivg5RwGHk9w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=bBl4tnGK2q0CgBNYHWJygZi6FS7zbnoZDZ93EnCwqEjx7k59TmS+JA5H2L6vHlbwoR Ks7Ft1tYM0KNEoOBwXWBlqg+SFdNg1U1xpChG03iow+yqsdcEsd5Oqd1lSWnwo2bs/bb 208MOEM2nrkB3NeaojtVLs7gGONzIuAViFhgo= Received: by 10.223.143.9 with SMTP id s9mr5758941fau.52.1273087896279; Wed, 05 May 2010 12:31:36 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 22sm419668fkr.29.2010.05.05.12.31.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 May 2010 12:31:34 -0700 (PDT) Date: Wed, 5 May 2010 21:31:28 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Palash Bandyopadhyay , Greg Kroah-Hartman , linux-media@vger.kernel.org Subject: Re: -next: staging/cx25821: please revert 7a02f549fcc Message-ID: <20100505193128.GI27064@bicker> References: <20100505072738.GH27064@bicker> <4BE18EF9.9010502@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4BE18EF9.9010502@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Wed, May 05, 2010 at 12:30:01PM -0300, Mauro Carvalho Chehab wrote: > This simplifies the code a little bit, and, instead of just return -EINVAL, > it will return the error condition reported by the called functions. > Thanks for that. There was one return that got missed. Probably you can fold it into your patch? Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/staging/cx25821/cx25821-medusa-video.c b/drivers/staging/cx25821/cx25821-medusa-video.c index 7545314..34616dc 100644 --- a/drivers/staging/cx25821/cx25821-medusa-video.c +++ b/drivers/staging/cx25821/cx25821-medusa-video.c @@ -849,10 +849,8 @@ int medusa_video_init(struct cx25821_dev *dev) value |= 7; ret_val = cx25821_i2c_write(&dev->i2c_bus[0], PIN_OE_CTRL, value); - if (ret_val < 0) { - mutex_unlock(&dev->lock); - return -EINVAL; - } + if (ret_val < 0) + goto error; mutex_unlock(&dev->lock);