From patchwork Wed Dec 9 19:23:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 66051 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB9JNmRn021196 for ; Wed, 9 Dec 2009 19:23:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756814AbZLITX2 (ORCPT ); Wed, 9 Dec 2009 14:23:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757123AbZLITX1 (ORCPT ); Wed, 9 Dec 2009 14:23:27 -0500 Received: from mgw1.diku.dk ([130.225.96.91]:52722 "EHLO mgw1.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757064AbZLITXZ (ORCPT ); Wed, 9 Dec 2009 14:23:25 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw1.diku.dk (Postfix) with ESMTP id 934AF52C3A6; Wed, 9 Dec 2009 20:23:31 +0100 (CET) X-Virus-Scanned: amavisd-new at diku.dk Received: from mgw1.diku.dk ([127.0.0.1]) by localhost (mgw1.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2eY7PSjb+o-Q; Wed, 9 Dec 2009 20:23:30 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw1.diku.dk (Postfix) with ESMTP id 602C052C392; Wed, 9 Dec 2009 20:23:30 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id DA23F6DF84F; Wed, 9 Dec 2009 20:19:43 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id 4467A475B; Wed, 9 Dec 2009 20:23:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 3D95B4632; Wed, 9 Dec 2009 20:23:30 +0100 (CET) Date: Wed, 9 Dec 2009 20:23:30 +0100 (CET) From: Julia Lawall To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 4/12] drivers/media/radio: Correct size given to memset Message-ID: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -u -p a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c --- a/drivers/media/radio/radio-tea5764.c +++ b/drivers/media/radio/radio-tea5764.c @@ -314,7 +314,7 @@ static int vidioc_g_tuner(struct file *f if (v->index > 0) return -EINVAL; - memset(v, 0, sizeof(v)); + memset(v, 0, sizeof(*v)); strcpy(v->name, "FM"); v->type = V4L2_TUNER_RADIO; tea5764_i2c_read(radio); @@ -371,7 +371,7 @@ static int vidioc_g_frequency(struct fil struct tea5764_regs *r = &radio->regs; tea5764_i2c_read(radio); - memset(f, 0, sizeof(f)); + memset(f, 0, sizeof(*f)); f->type = V4L2_TUNER_RADIO; if (r->tnctrl & TEA5764_TNCTRL_PUPD0) f->frequency = (tea5764_get_freq(radio) * 2) / 125;