From patchwork Thu Oct 13 16:40:32 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: 9375507 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 696BF60839 for ; Thu, 13 Oct 2016 17:01:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B4EF2A11E for ; Thu, 13 Oct 2016 17:01:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FA2E2A16D; Thu, 13 Oct 2016 17:01:47 +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 2FCAF2A16C for ; Thu, 13 Oct 2016 17:01:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933170AbcJMRBo (ORCPT ); Thu, 13 Oct 2016 13:01:44 -0400 Received: from mout.web.de ([212.227.17.11]:61224 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752516AbcJMRBa (ORCPT ); Thu, 13 Oct 2016 13:01:30 -0400 Received: from [192.168.1.2] ([77.182.72.22]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0Lba35-1b9WcE0FIJ-00lHrJ; Thu, 13 Oct 2016 18:40:33 +0200 Subject: [PATCH 13/18] [media] RedRat3: Return directly after a failed rc_allocate_device() in redrat3_init_rc_dev() To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sean Young , Wolfram Sang References: <566ABCD9.1060404@users.sourceforge.net> <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <85408b7a-bd13-ed8f-bbc1-1c07a2285f67@users.sourceforge.net> Date: Thu, 13 Oct 2016 18:40:32 +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: <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> X-Provags-ID: V03:K0:mrgHw/D8KCpvFOo1bDUpuNbXpy6CGcdLmbiPaPCxkRdALyTYPEM d8Ga0vaL+3gU0L9jCZBvEoPPsKNfJHaPZdY5ewtfbiLep2P42qlrjDNqho35ZR9UA/GFl1J kUULM5h3K+UoBvH7NJsbVu/15iwBik+/XRgZMwJvxUn0MyIOjYsA9NK0/5H4m33wDrb4WSR TAulc2K44G/dgwavgqFqA== X-UI-Out-Filterresults: notjunk:1; V01:K0:KYsmDjg9l5Y=:uetb1ZyrX8LlF/Kpyhilre JrLpuI2G5WQIIUDHMed3m11ooTz0Cx09BpYRssFY/zVziEQfpiqoZYpi4l4wJZYep0UfxNVnf Ci0bdPF8ttu3J+Z5+fIn/q9XBOAD8hLqNJkrq1zrwG86QOw1hap07UZKlJYb9gvXHcaRUWY42 yQ2fn/lsOyJQ2Cty2Z3YKHUPGoO0kknStKz7eahEt72fh5joDSQG21rMF6KcoDMNbVEB2L5Am DUv3mlseE/o+36Tso0jWpIKtfA9opGNaCyzxaYvzTZqV/W6s4k1jGIk2uQC0xXy1W1oT12Z+7 arU/Y7tcpTavn8w5AuFvLooi2KX2qoXiwMU7+zGXvcdK3dozkpbmY9sPj5luBKMY1532eAAe+ Wyb3kdeJcgx1Jw8HxXaad6pctxW4wlh4LZao4nSJfJCAmvUjSfAxyO1XmUgH5oz+B4YGbZk0y VRzByt6k4ccv8yiYYqDYB4fYWmxqv+aViXwakjmBM47meX7bAlkRTJ+5QiGzqjYT8/vvHrcvW wdGJ0mYmw21nFDbODElTYOfBS/7nxqtXNE/gJpv6TrRuAqIZsKCN95baFF/mww4gT627Rppd2 WFoWxwTV2Liaj9iCxE9jJiRqZOpZozLqC+HC1T4ernjQO31vsddcfYxXMW2KErpDn99ZS5iFg DviSuxas1fyYKDlbNrBY8hUMnETvF4DXfQVsVSjE74lavwzhdcDq1tM/ufEFmyVU4E14CBd/+ tyXQpF4hfmsw2U1+4rC5l8qnOFLMS7/R7t+qKx5Z5q4snltx8E/mDVSmOhcNA8oG8zNkYndyO Ej0Tf4N 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: Thu, 13 Oct 2016 14:54:46 +0200 Return directly after a call of the function "rc_allocate_device" failed at the beginning. Signed-off-by: Markus Elfring --- drivers/media/rc/redrat3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 002030f..74d93dd 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -860,7 +860,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) rc = rc_allocate_device(); if (!rc) - goto out; + return NULL; prod = le16_to_cpu(rr3->udev->descriptor.idProduct); snprintf(rr3->name, sizeof(rr3->name), "RedRat3%s "