From patchwork Wed Oct 12 14:35:12 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: 9373305 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 D9F2060839 for ; Wed, 12 Oct 2016 14:42:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB48F29122 for ; Wed, 12 Oct 2016 14:42:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C008729638; Wed, 12 Oct 2016 14:42:28 +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 774A129589 for ; Wed, 12 Oct 2016 14:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933602AbcJLOmB (ORCPT ); Wed, 12 Oct 2016 10:42:01 -0400 Received: from mout.web.de ([212.227.15.14]:54204 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933547AbcJLOl6 (ORCPT ); Wed, 12 Oct 2016 10:41:58 -0400 Received: from [192.168.1.2] ([78.49.9.22]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0MLDEn-1bubjs1rc1-000OWL; Wed, 12 Oct 2016 16:35:13 +0200 Subject: [PATCH 05/34] [media] DaVinci-VPBE: Return an error code only as a constant in vpbe_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:35:12 +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:U7WcC27AJ5X92mSGiF3fk3NfN7elq0WlH6kyzsf6Zt+dPcprmJi XK6yIa2CRhHIidgZwz3YW6Ptfu7AH2ct8HdQQB5rXPSYEN/un5U2mIopG9FFhz/D/9jbL0H pCbSMkOstAGhTZrayCzRMQ0XnqetGrmM3wZvH3W26snZQCjWryPfXYCH9HgRujgzwF8bG33 pDI727maV87Weahoj1yvA== X-UI-Out-Filterresults: notjunk:1; V01:K0:/1XKmxnyhKo=:GnjJ6SBuITYIFviFlhllwK G8L2V71WiyK1S2MAM1uvYaZh3m3vDpg+J0jIKH2ZbVdrrLHqIFfkhKXHEHpaw04sMhbNYNK36 kUhha/mjv3wcpq4PaUx7xTvbVKozF7UIB19zx6Sp+ObwBmutM9RG0MgmjmaYf+SR30t7jiq9r g8ADOvEe1hDJRcWqhmXjDuheH5SyoapNtc8XIperCr12MPjdVuAQl76ebxXFVJUe7wSyiSeTO gHyBE+KxeCj3arAFKsHnAvUDt5yBGzuFrOUh/gycUZ29UqPc5xT+zR8kVuvkVL64PMZVL4a3b It/2d6j8zH3gj7DOsEZR8wvivd02W2KpWvN53I2Yy5YBAGe4kOVN6ZgtPk6Mw/7sim8I2RX5a xooGPn3AowaJ3YwUabtBc9LK1d/HozB43fTyIFkHb0rDAF0a5KhkqbQ8TR1WN5DhkHXmqa6dy rJesMPmy8w9akjKfBecbLnWU17rObugEjUlmdnWMRZFqfwfqGaKpxcq7pV2I9WjCzBupwaJ0N diwpiT2qfaMzAMonIvRaVfA6+H1oLqYIdoaD6JpENDpvwwDvbaV7AyUkzg9QDnfGpzMpvCizH 5+g1EOeqQLrgee/M/Ha/xjHXYd9OYe+LCVxWuZx16Q+zaK6QpA9Yuy8nvJ1LZWD9Uk61YqoEX +f7EfZ2OhQPB04WUOwxvqKuLXZpVM8mG0kMV1zdFAXOyqtIjTmR4jT9naaQysyicNn9b+n3nD R9mOIYZx8yQ1Grdk179i6FXeuCuaWUPyuszZ74IpqgLBnfb1ifa8aDGOImAW16szvBOfaGVKi zsCFbmL 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: Tue, 11 Oct 2016 13:43:25 +0200 * Return an error code without storing it in an intermediate variable. * Delete the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/media/platform/davinci/vpbe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 625bddf..4c4cd81 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -821,7 +821,6 @@ static int vpbe_probe(struct platform_device *pdev) { struct vpbe_device *vpbe_dev; struct vpbe_config *cfg; - int ret = -EINVAL; if (!pdev->dev.platform_data) { v4l2_err(pdev->dev.driver, "No platform data\n"); @@ -834,7 +833,7 @@ static int vpbe_probe(struct platform_device *pdev) !cfg->venc.module_name[0]) { v4l2_err(pdev->dev.driver, "vpbe display module names not defined\n"); - return ret; + return -EINVAL; } vpbe_dev = kzalloc(sizeof(*vpbe_dev), GFP_KERNEL);