Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755465AbcJLPBG (ORCPT ); Wed, 12 Oct 2016 11:01:06 -0400 Received: from mout.web.de ([212.227.15.3]:52953 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933243AbcJLO7x (ORCPT ); Wed, 12 Oct 2016 10:59:53 -0400 Subject: [PATCH 21/34] [media] DaVinci-VPFE-Capture: Delete an unnecessary variable initialisation in 11 functions To: linux-media@vger.kernel.org, Hans Verkuil , "Lad, Prabhakar" , Mauro Carvalho Chehab References: Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: Date: Wed, 12 Oct 2016 16:59:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:TRDVkL8Wrm82nWq1SdcpEulJfJMFxI2MbcKQkulPjQmMRNKEPDZ MyzVA3GFnMqNPiP+jbsaoHswEC8rmsFrgJQPm3MNwnAA9f4Mv5tiA/K05a2JezJ+Fyh1WCV R/nmoj7hU5ExyTEeJeYryXD7xg7dFvYhqpsDnuvnYehFgUwPOa6bCfmAiSRPy9mVZxWN1iV MmJCLi5erasiv8Iv5R4fw== X-UI-Out-Filterresults: notjunk:1;V01:K0:6E+zdWVu6Ww=:64koUkbTnFpUPR0/XdtKcL LxRaghiFM9LReOd8oAX05gnUlDS0nqI2pJQHtFpB/7U29eOvmaAKpFVuFMdclij9JVp8VHNN1 Djmav5fNwkDfA1VYa60Bbq83LUJGfpzoGTmhLzP6Yw8WS5AaBr4q6GqsfK0OL+YfyPlhJR0N3 L/PHzbUnhzoxAAH1il1/Xk1KS8SR4PJ9lFh7/uBXl0ujCUHJdmCq+DH5oaf6SUU03tUSi8np3 ngw4Zfmr2UkMLOYbZvmYbMtLIOBAtAAjTXdxXsC8LZAi3YJu/hgXKfBdlDdqwnT5BhMMugMqK 7Mfz0HeCJ2HiO9XP0I+hrRQUUuNSzlHEP9aTSRCkCyvbbCKJ7k+OSuI3enMl5l0IPzkha42mk EObI6oPSKNbusJVNCAO5HAJb0keVsGpxuphFohXRcLa3O9ywHRf1Vs2oIq4irx/JAyX5uU+8N aw1/TWNhxPM4rvqNXNI8H/tJWgbHf5DfJhhWi0lsXAxG8GIyLoemscswNVd/cpufG9pH/pfeg +gjj6Hi8jsMY0w2TMMyrgDIeFNP/K6gG3xpHS7HPPnCfPIzFQfRHoP66/Ra7zuvaIZFjqKC74 OgoV+xAi+YPSBQ6k9McFhUv4MDOvNV3PW476jgVNqidO2hBoo49ljFHrB7UjWxR7R1wn1ggcj 6fS96JxlvJea6C+7ww5Dim4UHkWUbcXEOFUXqgycGWEp22tpUm8WvxJKP/cpXVV4noR+WPxxh lTKfSdTJIQdWvbfWkF0Z9RRFEpM1H1kALHsfgXAt2Y1Lw+CaGLQVWNkdDkakvCwe5fVfzxuaa n7jUEOU Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3798 Lines: 116 From: Markus Elfring Date: Wed, 12 Oct 2016 10:50:54 +0200 The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/media/platform/davinci/vpfe_capture.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 9da353b..ba71310 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -384,7 +384,7 @@ static int vpfe_config_image_format(struct vpfe_device *vpfe_dev, }; struct v4l2_mbus_framefmt *mbus_fmt = &fmt.format; struct v4l2_pix_format *pix = &vpfe_dev->fmt.fmt.pix; - int i, ret = 0; + int i, ret; for (i = 0; i < ARRAY_SIZE(vpfe_standards); i++) { if (vpfe_standards[i].std_id & std_id) { @@ -453,7 +453,7 @@ static int vpfe_config_image_format(struct vpfe_device *vpfe_dev, static int vpfe_initialize_device(struct vpfe_device *vpfe_dev) { - int ret = 0; + int ret; /* set first input of current subdevice as the current input */ vpfe_dev->current_input = 0; @@ -979,7 +979,7 @@ static int vpfe_s_fmt_vid_cap(struct file *file, void *priv, { struct vpfe_device *vpfe_dev = video_drvdata(file); const struct vpfe_pixel_format *pix_fmts; - int ret = 0; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_s_fmt_vid_cap\n"); @@ -1112,7 +1112,7 @@ static int vpfe_s_input(struct file *file, void *priv, unsigned int index) int subdev_index, inp_index; struct vpfe_route *route; u32 input = 0, output = 0; - int ret = -EINVAL; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_s_input\n"); @@ -1178,7 +1178,7 @@ static int vpfe_querystd(struct file *file, void *priv, v4l2_std_id *std_id) { struct vpfe_device *vpfe_dev = video_drvdata(file); struct vpfe_subdev_info *sdinfo; - int ret = 0; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_querystd\n"); @@ -1197,7 +1197,7 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id) { struct vpfe_device *vpfe_dev = video_drvdata(file); struct vpfe_subdev_info *sdinfo; - int ret = 0; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_s_std\n"); @@ -1346,7 +1346,7 @@ static int vpfe_reqbufs(struct file *file, void *priv, { struct vpfe_device *vpfe_dev = video_drvdata(file); struct vpfe_fh *fh = file->private_data; - int ret = 0; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_reqbufs\n"); @@ -1478,7 +1478,7 @@ static int vpfe_streamon(struct file *file, void *priv, struct vpfe_fh *fh = file->private_data; struct vpfe_subdev_info *sdinfo; unsigned long addr; - int ret = 0; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_streamon\n"); @@ -1561,7 +1561,7 @@ static int vpfe_streamoff(struct file *file, void *priv, struct vpfe_device *vpfe_dev = video_drvdata(file); struct vpfe_fh *fh = file->private_data; struct vpfe_subdev_info *sdinfo; - int ret = 0; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_streamoff\n"); @@ -1647,7 +1647,7 @@ static int vpfe_s_selection(struct file *file, void *priv, { struct vpfe_device *vpfe_dev = video_drvdata(file); struct v4l2_rect rect = sel->r; - int ret = 0; + int ret; v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_s_selection\n"); @@ -1705,7 +1705,7 @@ static long vpfe_param_handler(struct file *file, void *priv, bool valid_prio, unsigned int cmd, void *param) { struct vpfe_device *vpfe_dev = video_drvdata(file); - int ret = 0; + int ret; v4l2_dbg(2, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); -- 2.10.1