From patchwork Wed Oct 12 14:54:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9373345 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 F1A1160865 for ; Wed, 12 Oct 2016 14:55:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E17A629E35 for ; Wed, 12 Oct 2016 14:55:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5A5829E2F; Wed, 12 Oct 2016 14:55:03 +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 7621329E35 for ; Wed, 12 Oct 2016 14:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933101AbcJLOyj (ORCPT ); Wed, 12 Oct 2016 10:54:39 -0400 Received: from mout.web.de ([212.227.15.14]:58902 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754985AbcJLOye (ORCPT ); Wed, 12 Oct 2016 10:54:34 -0400 Received: from [192.168.1.2] ([78.49.9.22]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0LrbHJ-1aro503YhJ-013MWF; Wed, 12 Oct 2016 16:54:19 +0200 Subject: [PATCH 16/34] [media] DaVinci-VPFE-Capture: Delete an unnecessary variable initialisation in vpfe_probe() 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:54:17 +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: X-Provags-ID: V03:K0:/AsfqX9npjWlrHWxnOa5imVi9tuzPDu1ebFlRU67rla0B8iUmsj RQ5QJcFo/ZudbDv0o7c/M9kOvndLHKhS1HIXkmU3FofzkDAsE6CjEuQufQ7uBZdZNG47xAI yx2yR5kVtPUJTsfXDtEL4j8MBI0JK5LBYzw+raTHM1qcR2Qstlq3XZd9Mt78HI+TbY9vIe1 tgjHP4+kFA8EiKUFUnvqQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:3SAKrJ4+CQs=:uuP8vajQQoNa7tjSXWQIEp Hy//0KEaEh+tm/azM5Lun21oDVpqvw6sSPYxCBIC/Q6QpbS7RVz1xJlHVjDDw3f/8wiE5zsFC /aPT9czpK6I03M2F+ZOFT1wuiOoORLEWPbarSYNZPE0a0cZQ0hFcz4nLvjUcurCmIh737t8Ke 9CMYpQzZpJsNwSvJ5KXLVxItsQpy2uyd65y3uPYrxcUuQTnnoJENzjm1MSNN1iJw0a1hr2AVS 3o9Z04P7ZwAJkPk6pXkolC5Jlb2apqCdiSi6gg/WVkboX1szGlt7b5sd4V9FX3cjKuhuqSuCQ txBvf8wyFTqetszVjmAPcLXmDsVvjzp2dcCxya0+1YMX1oGU++ywtGmRWxMOdWd80DDZYULK1 /MtMAdNe/wM9n6G1+05YimlGWh3RNZju1RpB9aGbV1QCEyFJrq/Z9ZWKUos7oEnwM+xdc+1rR 9FUf7JCSYEe3WcgArJ/Dn4ufn+U8B90WH+3ODJ2VeSBZLsgeftFkWDUcbqWw79Bu8bAEtJyuX s2EZzk/uxBf7ARdAc/BnEcLsm9qyTB2k9PSlED765O5oRBMD5PsG0Qmr+php45Nh+YQ7xREd6 w9A/Po68CWHjDHDPTwlAsEoFEHKMneTEg2VgKhrjVGVTtlHBmtyHdlhbSevyKiJNKMcsxK1Bh r1pGPihmPue7t8TefdluaiO6W6CdOpbWDp+++oNglZhIQOJf52qWczO1ruOA64jELpFkmlo7g OcIOcrWS5tWagg5lIFJb58qjMRv9l6AupmpDiLlo3kwrT2ZxaCwYLgYCu5/hmi/UiHTQA28gZ glwj795 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 From: Markus Elfring Date: Wed, 12 Oct 2016 10:30:28 +0200 * Return an error code as a constant after a failed call of the function "vpfe_initialize". * The local variable "ret" will be set then 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 4db3212..8314c39 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -1819,7 +1819,7 @@ static int vpfe_probe(struct platform_device *pdev) struct vpfe_device *vpfe_dev; struct i2c_adapter *i2c_adap; struct video_device *vfd; - int ret = -ENOMEM, i, j; + int ret, i, j; int num_subdevs = 0; /* Get the pointer to the device object */ @@ -1828,7 +1828,7 @@ static int vpfe_probe(struct platform_device *pdev) if (!vpfe_dev) { v4l2_err(pdev->dev.driver, "Failed to allocate memory for vpfe_dev\n"); - return ret; + return -ENOMEM; } vpfe_dev->pdev = &pdev->dev;