Message ID | 20230306160016.4459-5-tzimmermann@suse.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1922431wrd; Mon, 6 Mar 2023 08:03:08 -0800 (PST) X-Google-Smtp-Source: AK7set8b5qyVP5JHPNpHhQyfl0Qr1VAo5MWgrKJQU4PFQu4W6/hXYC0PliSvdtj05xvEdJMPG/nK X-Received: by 2002:a62:3142:0:b0:5dc:ecea:f650 with SMTP id x63-20020a623142000000b005dceceaf650mr8639330pfx.19.1678118588280; Mon, 06 Mar 2023 08:03:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678118588; cv=none; d=google.com; s=arc-20160816; b=eWciCGmvy5eP1UtGlTMl/hT1c93Tc6UuQjTFS3gS/MQglF4IiFoLroQ1MMshHxAeRA RKC3n7OCw2kl6AAlw2ydq7t1u6eFZJhLJjD+YK3yGZ0vL3e32Pj0R6BuEGfnS4tSM8E+ 43tlVII7/RAGdHOMLQaO0FoBKwertgu83QX0lp6NGb2bysH3BGJPe0SVwREx5sbMFI7+ 2SEReEorP/O6rtJzYaJ2DTOkNPvqBz0BpQ3j/e8d9uYGCayxDVo/k0Y/Iq9UbdWbYAx6 lSSk9JgCmuTYXU5kQtQ06SpDINAj6JrATgy3PJFEyyqZQHxehRe+PJ0H0u9UxXfHnNvg 7hXw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=zjVYDbqjwwkw2fXJsfJw/E5OA0vR4qLTqrFh9CEDVls=; b=SieDciDqZNOuucaix+BZWsX41cN9L4DLfy7Z+vWJ+ubzBbS1/p8zhioX+nDuGDR2rJ kIkP3cX13euXrtLZJn7wQlgO3bWEjBAnMJxOryx4n3qDX4D9PhohgN4EqP4eEToO8erU TkbBArU0OUXgsh9/V1WLa09WShpUl1+BSgbDe9WWRlZKLaPKv1RDhr+qYPH1OaUua8Fa eZtYiAVUZZXQlMXjpiNHuID2KBa43pHKHFa/XeehNkbMwT0L5BCNs94OD6RJsUynwmsU uT7eNiSuLnFgY5kBjC4Tomh9C7PzUmi8kBFzeiiQUpdqKNsT47P5J7DqwLnWmsVdFfBh 186w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZLVSod84; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1qLnPhqD; 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=suse.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020aa793cd000000b005924db893c3si9909179pff.195.2023.03.06.08.02.53; Mon, 06 Mar 2023 08:03:08 -0800 (PST) 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=@suse.de header.s=susede2_rsa header.b=ZLVSod84; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1qLnPhqD; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231234AbjCFQAs (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 6 Mar 2023 11:00:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230248AbjCFQAa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Mar 2023 11:00:30 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9055E2E820; Mon, 6 Mar 2023 08:00:27 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E49BA22374; Mon, 6 Mar 2023 16:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678118425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zjVYDbqjwwkw2fXJsfJw/E5OA0vR4qLTqrFh9CEDVls=; b=ZLVSod84jRFbPAgwcB/rSvYcuZWfcsxYuav+FTZqNFxsvnSfLRLU5huBmNGYVcvI8yno3A LA6pDjPT9aLuYAnnxhNodGwZ0RQ01ADMXbwahNoCcOCLwr3EeuDzjnOQEDy0IJnIyWT0tF 87OwqsKqf6RZr2exDvFhk8cgBNc17fg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678118425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zjVYDbqjwwkw2fXJsfJw/E5OA0vR4qLTqrFh9CEDVls=; b=1qLnPhqDZxTWyF1Se8kIFwwbvl09iQB96aeANdlPfciPamDkNnuZwA/St9n7mOre6S3RgJ L7j9zubiyqevDiAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9116313513; Mon, 6 Mar 2023 16:00:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uF6yIhkOBmQ/PwAAMHmgww (envelope-from <tzimmermann@suse.de>); Mon, 06 Mar 2023 16:00:25 +0000 From: Thomas Zimmermann <tzimmermann@suse.de> To: deller@gmx.de, paulus@samba.org, benh@kernel.crashing.org, linux@armlinux.org.uk, pjones@redhat.com, timur@kernel.org, adaplas@gmail.com, s.hauer@pengutronix.de, shawnguo@kernel.org, mbroemme@libmpq.org, thomas@winischhofer.net, James.Bottomley@HansenPartnership.com, spock@gentoo.org, sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, geert+renesas@glider.be, corbet@lwn.net Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Thomas Zimmermann <tzimmermann@suse.de> Subject: [PATCH 04/99] fbdev/acornfb: Only init fb_info once Date: Mon, 6 Mar 2023 16:58:41 +0100 Message-Id: <20230306160016.4459-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306160016.4459-1-tzimmermann@suse.de> References: <20230306160016.4459-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759634876650189551?= X-GMAIL-MSGID: =?utf-8?q?1759634876650189551?= |
Series |
fbdev: Fix memory leak in option parsing
|
|
Commit Message
Thomas Zimmermann
March 6, 2023, 3:58 p.m. UTC
Init the fb_info instance once before parsing options. The current
code initializes the instance once again after parsing options, which
clears any resolution settings that have been given in the options
string.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/acornfb.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c index 1b72edc01cfb..8642136a6bdc 100644 --- a/drivers/video/fbdev/acornfb.c +++ b/drivers/video/fbdev/acornfb.c @@ -887,8 +887,6 @@ static int acornfb_setup(char *options) if (!options || !*options) return 0; - acornfb_init_fbinfo(); - while ((opt = strsep(&options, ",")) != NULL) { if (!*opt) continue; @@ -930,9 +928,8 @@ static int acornfb_probe(struct platform_device *dev) if (fb_get_options("acornfb", &option)) return -ENODEV; - acornfb_setup(option); - acornfb_init_fbinfo(); + acornfb_setup(option); current_par.dev = &dev->dev;