From patchwork Wed Jun 8 03:30:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abylai Ospan X-Patchwork-Id: 9163273 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2DDEF60571 for ; Wed, 8 Jun 2016 03:37:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11E4B28360 for ; Wed, 8 Jun 2016 03:37:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 039FC28373; Wed, 8 Jun 2016 03:37:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C29F28360 for ; Wed, 8 Jun 2016 03:37:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754022AbcFHDhM (ORCPT ); Tue, 7 Jun 2016 23:37:12 -0400 Received: from [216.47.245.140] ([216.47.245.140]:43874 "HELO your.mail.server.name.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with SMTP id S1754017AbcFHDhM (ORCPT ); Tue, 7 Jun 2016 23:37:12 -0400 X-Greylist: delayed 406 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Jun 2016 23:37:11 EDT Received: (qmail 21518 invoked from network); 8 Jun 2016 04:19:24 -0000 Received: from unknown (HELO x1) (10.128.3.187) by 0 with SMTP; 8 Jun 2016 04:19:24 -0000 Received: by x1 (Postfix, from userid 1000) id 6C0A69A38AF; Tue, 7 Jun 2016 23:30:17 -0400 (EDT) From: Abylay Ospan To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Abylay Ospan Subject: [PATCH] [media] Fix DVB-T tuning Date: Tue, 7 Jun 2016 23:30:16 -0400 Message-Id: <1465356616-21333-1-git-send-email-aospan@netup.ru> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP can't tune to DVB-T because 10 bytes can't be written to tuner Signed-off-by: Abylay Ospan --- drivers/media/dvb-frontends/ascot2e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/ascot2e.c b/drivers/media/dvb-frontends/ascot2e.c index f770f6a..8cc8c45 100644 --- a/drivers/media/dvb-frontends/ascot2e.c +++ b/drivers/media/dvb-frontends/ascot2e.c @@ -132,7 +132,7 @@ static int ascot2e_write_regs(struct ascot2e_priv *priv, } }; - if (len + 1 >= sizeof(buf)) { + if (len + 1 > sizeof(buf)) { dev_warn(&priv->i2c->dev,"wr reg=%04x: len=%d is too big!\n", reg, len + 1); return -E2BIG;