Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp667023pxb; Tue, 5 Apr 2022 18:00:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdyFVyBYEdPA2i7Bplvf1qkNx3ovQwKx2Q31BcmcXXEhFZrKnEYSN5K9ZqvmgvpFjzi/l8 X-Received: by 2002:a17:907:2d06:b0:6e7:f857:d539 with SMTP id gs6-20020a1709072d0600b006e7f857d539mr6062080ejc.177.1649206814289; Tue, 05 Apr 2022 18:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649206814; cv=none; d=google.com; s=arc-20160816; b=jggnaidaSt6S7diDWD2uwCz4D3yiX3AhdvrDqD/EOphZA3/RF8cpSGPLW1cAjrHgoI RuIpWIUAvOdHyRYzELuT3g0HtwbOiGkdS7aFUlaLDNP1BW6bHDz3QlvAvKyg8DcOcbIu iyWdmomtqjZ1l4DhklhQacVcrFPhroSr8x5EtynUW/OLLq1tfbMmZ3eboiWtgUbzur+S LEHF1E1+RD2luMSOVSH1sdsM4Y5OAV6VlAyhhjiJEGZ/yDbv3IhdmLmgVReRA98rS16S Fl3dz5lzr4jjnu+Yns6bKko082qhwUw2bFwWcysa6RBI5yl/+YUOxSiCaAy9mWKKkuO3 cwAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QE3bccCUBGixJ+yerxLqsiHFmSyjQTVCrD6Z18QILQw=; b=UjcV1MeryziawfbTYD7sW+JHWgOdWXNaIRzGuGQHRyWscE1GoxTVm1szx6ySP/PLb/ 4v4cJem39oM/yq0Eac7/PkDeoKruITP78LsblUhF8cZ15udEqiwyQESkv1EVqrVEkLMn IZL7+RVpkVEEk3vsC977MLVaXHWO89AAxjX9yx0BmFoDohZZ0iNxbgNUaPXa3a/g9r1R 7Xk2HwNFgNk57xS8JbasfIcXz5FXs8DWZ3VjdNhckj5Z3J5Ba23gUzXrcNI+i5S6FFlY WuvMkbC8BR5ETiPUFPXhRLTOfvpdu6TpER5XIoxi3eWNm+ssWvhVLuGaQl7jHyM8Fheb cFfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sLxrzvU+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a17090654d100b006e802115fc7si4151286ejp.526.2022.04.05.17.59.44; Tue, 05 Apr 2022 18:00:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sLxrzvU+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353407AbiDELy7 (ORCPT + 99 others); Tue, 5 Apr 2022 07:54:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244925AbiDEIws (ORCPT ); Tue, 5 Apr 2022 04:52:48 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 347B424968; Tue, 5 Apr 2022 01:46:40 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id A6126CE1BF9; Tue, 5 Apr 2022 08:46:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA04CC385A0; Tue, 5 Apr 2022 08:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148397; bh=SiWQfNK6upuvyL25sOXXFwldcQxeRu/FiH4eEINwg/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sLxrzvU+ReIGd0lQr7k6weWMlk2vfbZ9OS4tW5ZZeuo3LkA3fWSgV3DLBYSK2W77M YXun2CPEgB479f33fMa+2ctuo/p/4Hy1SfYB/1ZId3j5iTdq2Z9xWGxOseERpx2XZ0 bcm70/FDBFeOku0M8qF+YRLxHZlQmocMxkg9mY90= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Nicolas Ferre , Helge Deller , Sasha Levin Subject: [PATCH 5.16 0305/1017] video: fbdev: atmel_lcdfb: fix an error code in atmel_lcdfb_probe() Date: Tue, 5 Apr 2022 09:20:18 +0200 Message-Id: <20220405070403.329591789@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit fee5c1e4b789e41719af9fee0e2dd397cd31988f ] If "sinfo->config" is not found, then return -ENODEV. Don't return success. Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport") Signed-off-by: Dan Carpenter Acked-by: Nicolas Ferre Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- drivers/video/fbdev/atmel_lcdfb.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c index 355b6120dc4f..1fc8de4ecbeb 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c @@ -1062,15 +1062,16 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) INIT_LIST_HEAD(&info->modelist); - if (pdev->dev.of_node) { - ret = atmel_lcdfb_of_init(sinfo); - if (ret) - goto free_info; - } else { + if (!pdev->dev.of_node) { dev_err(dev, "cannot get default configuration\n"); goto free_info; } + ret = atmel_lcdfb_of_init(sinfo); + if (ret) + goto free_info; + + ret = -ENODEV; if (!sinfo->config) goto free_info; -- 2.34.1