From patchwork Tue May 4 12:31:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 96725 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o44CVSRu029211 for ; Tue, 4 May 2010 12:31:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758232Ab0EDMbZ (ORCPT ); Tue, 4 May 2010 08:31:25 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:37253 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757684Ab0EDMbY (ORCPT ); Tue, 4 May 2010 08:31:24 -0400 Received: by fxm10 with SMTP id 10so3148818fxm.19 for ; Tue, 04 May 2010 05:31:22 -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:mime-version:content-type:content-disposition:user-agent; bh=hm3FsiVWAi9cgRsSQyEOnYVZYSd4uSoCU7C3jfc7W1s=; b=QEG3ZLiSfW4vaIqQC9U71Po+cur2clV5mRgzQXd2xEkdxMd0tHu+xzYAnlzqlbtFHR ooVJRTbilkjI4/bgDJdFqJJ56ZeuyBFRzK70Bdul5+2Xfe25ygGtqWW4TjEh3grcC/FB Sr/qodLDuMw9uhO/xk1Kv4K4j16kcPUuHlCrE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=uG4vdvcjnXtOE1yCiRUHfXEhnl1dziR+L4wF/Woek1sBjucUkhxAC+RFoEI+6zbdbc f+p2e3TA+ZrcDyKLEReFBwrVXcd+cRN9qzHIFXLatKKv4NnrwutsVUQH/VrStxf3oXgd pAb849xCJiykl37FDokIjH1O1pp52taPzVVGo= Received: by 10.223.46.135 with SMTP id j7mr4112335faf.105.1272976282022; Tue, 04 May 2010 05:31:22 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 9sm11243894fks.56.2010.05.04.05.31.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 04 May 2010 05:31:21 -0700 (PDT) Date: Tue, 4 May 2010 14:31:13 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch -next 1/2] media/az6027: handle -EIO failure Message-ID: <20100504123113.GY29093@bicker> MIME-Version: 1.0 Content-Disposition: inline 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 04 May 2010 12:31:28 +0000 (UTC) diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c index baaa301..6681ac1 100644 --- a/drivers/media/dvb/dvb-usb/az6027.c +++ b/drivers/media/dvb/dvb-usb/az6027.c @@ -701,10 +701,7 @@ static int az6027_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int o } else ret = 0; - if (b[0] == 0) { - ret = 0; - - } else if (b[0] == 1) { + if (!ret && b[0] == 1) { ret = DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY; }