From patchwork Thu Jan 26 15:06:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 89299 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1pL3qL-00A5ZM-Qb; Thu, 26 Jan 2023 15:07:14 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbjAZPHL (ORCPT + 1 other); Thu, 26 Jan 2023 10:07:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231846AbjAZPHK (ORCPT ); Thu, 26 Jan 2023 10:07:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0086B9A6 for ; Thu, 26 Jan 2023 07:07:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EB3A761870 for ; Thu, 26 Jan 2023 15:07:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE214C4339C; Thu, 26 Jan 2023 15:07:07 +0000 (UTC) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 07/17] media: marvell: change return to goto for proper unwind Date: Thu, 26 Jan 2023 16:06:47 +0100 Message-Id: <20230126150657.367921-8-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230126150657.367921-1-hverkuil-cisco@xs4all.nl> References: <20230126150657.367921-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no The probe function used 'goto out' everywhere, except in one place where it returned an error. That too should be a 'goto out'. This fixes a smatch warning: mmp-driver.c:257 mmpcam_probe() warn: missing unwind goto? Signed-off-by: Hans Verkuil --- drivers/media/platform/marvell/mmp-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/marvell/mmp-driver.c b/drivers/media/platform/marvell/mmp-driver.c index df16899ab1cb..ef22bf8f276c 100644 --- a/drivers/media/platform/marvell/mmp-driver.c +++ b/drivers/media/platform/marvell/mmp-driver.c @@ -254,7 +254,7 @@ static int mmpcam_probe(struct platform_device *pdev) */ ret = mccic_register(mcam); if (ret) - return ret; + goto out; /* * Add OF clock provider.