From patchwork Tue Aug 29 20:32:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9928253 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 5DD646022E for ; Tue, 29 Aug 2017 20:32:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50ECB20144 for ; Tue, 29 Aug 2017 20:32:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4610628A58; Tue, 29 Aug 2017 20:32:57 +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=unavailable 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 EF73F20144 for ; Tue, 29 Aug 2017 20:32:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751310AbdH2Ucm (ORCPT ); Tue, 29 Aug 2017 16:32:42 -0400 Received: from mout.web.de ([212.227.15.14]:56890 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbdH2Ucl (ORCPT ); Tue, 29 Aug 2017 16:32:41 -0400 Received: from [192.168.1.2] ([77.181.80.150]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MK6mD-1dlPbp0BvB-001SaP; Tue, 29 Aug 2017 22:32:32 +0200 Subject: [PATCH 2/3] [media] cx24113: Return directly after a failed kzalloc() in cx24113_attach() From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab , Max Kellermann , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <36a5402f-c7a2-edf0-1af8-b98b0684d8e5@users.sourceforge.net> Message-ID: <935e3259-e764-8395-84c8-def879f0bbbc@users.sourceforge.net> Date: Tue, 29 Aug 2017 22:32:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <36a5402f-c7a2-edf0-1af8-b98b0684d8e5@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:1sdxnyu870aeoh49YFx/Hj2JH4OlH4vV32uVz1gltNharHR84oT 7h4DBet5SZA77Im3G8CiGtziRYz/n6ufMbCcGbfCk0Ysn383AroRkieRUHx8iDf6STiiOhf IDCJ1oXpNyTNY1evzi7jvnqypjyrpodO56pjBpFEQoJoZQcqlgcCsReuplJy/JQG04kPG6G tCiDfQiDaBEMHnf1ZlY/Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:WgCqeyuC0zc=:xKCfDZ+sx5KejU8x7easQ0 9efNhxsDnv/9PN98LpQGf6ubhsljg1PYwva9+rfpTgbleFdN3bpJVqWrzA2HKgYS4BubkJ33n URRl5d8u80Wz7BwHWmzbzwCNU+i+T38keyJW/QIeqeSy/+8rE99W5bt9+zAFvS4kCGPVdMXLx 08Cirw7/tbrpgVpKIHXgb/wF06e2EvkWQQEqURsXoccr+2QcFT79g5RnRFvRRsGxrtftCpssU IUBEzyV2bMDoLEr6oOaohcjYofSNKbog4IYPUI56ChjGZt6hz805ENiZeQTeMZaqGBMu4yYA+ LCW+5uNrz4WNqJtQbR+Pc6ECAjhw8LmSpdQFdjZ+HHp76dU8JNABh2bjsN/E/Ui7Vs6j4DF9m EP0wcGa/GUOjbkCEq84G+3eRONq5bGqtEPjrUXL8ObZELK+rWTE16dtKHcIKLSE5lMYrUqcbi JVPu60PIImaNOyKAaSeeTTTSvFCPgSqj79DvLpUrPE6rASXy4j41Yoh2LRkmOaJ4VxcN241bh hGBT0WTH0u4OICJr+SWURwCNY0kP+G8KIMX1v9VrPXYGtbL+27R8vg+2rVmhQl6zmH8yO7Eud 9rLzPm/yJ0/UmtgO/4Z3imgEtT0hqmsx660aAdOfFWul2pjtL+COVex5S9XDbmOfjwyTN/bPC 5wyRhCEAxebjrcF7d7Ti4JdvlZuYPlMIgt3fBL2LdOoGIOXdhyBz+rWWqc0lHIy6j8PP3x8HK dPvNcYTb6d0dJdEzOs/T/s7GGXjUckQdXn89NkXVJu3l3ZxhL4QXramFciMzdHGkSimaXIQin w6VRdXPXf7RkAjV2xI2rsORdKfyqB0JlAaVmkXgC/GwSzCWgaI= 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, 29 Aug 2017 22:10:49 +0200 Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring --- drivers/media/dvb-frontends/cx24113.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/cx24113.c b/drivers/media/dvb-frontends/cx24113.c index 8fc7333c76b7..09c3fd1840f2 100644 --- a/drivers/media/dvb-frontends/cx24113.c +++ b/drivers/media/dvb-frontends/cx24113.c @@ -557,7 +557,7 @@ struct dvb_frontend *cx24113_attach(struct dvb_frontend *fe, int rc; if (!state) - goto error; + return NULL; /* setup the state */ state->config = config;