From patchwork Wed Oct 12 14:40:22 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: 9373299 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 2B66260839 for ; Wed, 12 Oct 2016 14:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CFDA29589 for ; Wed, 12 Oct 2016 14:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1058D29638; Wed, 12 Oct 2016 14:42:00 +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 B11C029122 for ; Wed, 12 Oct 2016 14:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933253AbcJLOlq (ORCPT ); Wed, 12 Oct 2016 10:41:46 -0400 Received: from mout.web.de ([212.227.15.4]:59895 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755168AbcJLOlo (ORCPT ); Wed, 12 Oct 2016 10:41:44 -0400 Received: from [192.168.1.2] ([78.49.9.22]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0Lfzwp-1b5dg807lz-00pcps; Wed, 12 Oct 2016 16:40:35 +0200 Subject: [PATCH 06/34] [media] DaVinci-VPBE: Return an error code only by a single variable in vpbe_initialize() To: linux-media@vger.kernel.org, Hans Verkuil , "Lad, Prabhakar" , Manjunath Hadli , Mauro Carvalho Chehab , Muralidharan Karicheri References: Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <31e1f827-3539-3bcf-e6c1-2b9df5fd3619@users.sourceforge.net> Date: Wed, 12 Oct 2016 16:40:22 +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:3ZzcgT2gGLFLYFs9pQ+pWlFX/XOeYYqyLSxMRUppn88zvlMIM3g idK3dsPoydIbRWFn7ZhbN7qHYzv1LtjtbNVqrVbut81a9xWRIzcpm4y4cNmtlfkHuKRBGdF RnFVGoS4HKJ/TbmujsQ2ebQ9UMv/Imf/UzLAz4iDJ8te+HOVhneZp0PvGcCZKv2e5jcEblm KI9P4md9nLNyRJ26ZlfAw== X-UI-Out-Filterresults: notjunk:1; V01:K0:/g8I8SZDu/M=:gk70bEcWirXbg3EPFaKCE0 I2xKgbkyngrKC2Cv2S8BGjXMbhxo82HnvedEoSz4Tokq91yJTsMN4SzmRjUw+y9Le1ADY67Fg ttFfuNDXpuJGh6xxsxPz7yj4aKk0OKYLaLfX9jvcicnd4WlcUrQrmttwk9tekO6UTajqHLtaK P4bZHuQfnwznIz3D19OMW7QOkJ5ikmZsRhYoYbMebuy46KA1tQPqz1zzyIWWGbbW2zEACYpDW 6dkWZdo0Nwj/WFwaFd6+Ftcr380ijBAu6/I3joIjDfofESNOf7ZEPKB5MsZLQ3rjEohwCMpkA LdNzUsxtulCuALxbc9uORTa00wIeeGWTqdPZc33Hdsmde/d1USA0xsloJ7vyScPcmVr87SYwL Xe2IWoVL4M9EGiav9dlqwLKiUwvdcRDceVDivCPh9S5n5dkNWHuOZf5npeAxm7nr95h5G+5/C 7UNzM8fwaUZ01fEeDvj2EYIvjoZDsZ3Ku8iAgoDeZJXkn+WZf9YbAAMLRD9Z6IUK/Raaeautt WMBpEH5zK/CC6DCs9GBDxsp8s68D6BdZK0+IfakEtEB9F+yCz/+e+kTEdLjvqk9a/Tyyzappt fsdVzM4fdHx9joxm/5rwxQ6E1a1JHjBxTSnuKQk1Y67pHvs0hIjp+lBzeMxdTAHhCjJTMT2Cr nWPNMBLqqi98PJMx144g9xIAmSKHhY17q3EpCEiG94hAcSbAQ0C7X5PzjIvz0REVhvabnz1sN vPR54smw26LNaIwZVTKWElsn0W71PaXAZsKjf3Fsp94gJ+iH4JDKL2Y7nKJeURhR7N2QFxlhh KVPFnQg 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 14:15:57 +0200 An error code was assigned to the local variable "err" in an if branch. But this variable was not used further then. Use the local variable "ret" instead like at other places in this function. Fixes: 66715cdc3224a4e241c1a92856b9a4af3b70e06d ("[media] davinci vpbe: VPBE display driver") Signed-off-by: Markus Elfring --- drivers/media/platform/davinci/vpbe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 4c4cd81..afa8ff7 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -665,7 +665,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) if (err) { v4l2_err(&vpbe_dev->v4l2_dev, "unable to initialize the OSD device"); - err = -ENOMEM; + ret = -ENOMEM; goto fail_dev_unregister; } }