Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1860036ybl; Thu, 5 Dec 2019 08:08:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzogM4TK+bO8VYq2pY3YCqKq4vAlg4pFrhLbrAk3rVmdVus6Vl+YMzDnKCFdU8Uy33zA5YA X-Received: by 2002:a9d:18b:: with SMTP id e11mr6689255ote.305.1575562139862; Thu, 05 Dec 2019 08:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575562139; cv=none; d=google.com; s=arc-20160816; b=s0l7nBJqe/pMxmWFZ1GMjxgt/6IpJzYkNa0O/Vdnoc9ceeDMSjzIPdvmoA4yLZt5at /WZ38O0azaibST2H8Brxe5dWFiwci4lgjO6tB123gL3Z16jo4Ped3XKkC56qxHF0j4iX 5i3ijpbcrrQQLAnDYLYKX0SSIrTmeywxmis9gz/f49b9gND6DRvTTRMBc1yS5G1bfJL5 w1GrR34avw/8vp5kA2Z3Ive9eECbdQghlsuIXIudI8Z/xz/JPwgoePRItc+et/x0CibT i7Jf0Pluo5uKtqUXaAo8j3W33Plhuc0beAI0szBryWVGhhFmVujv7/wevHetbFgycNZG vSsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=A6T5rNKNclcrc8zSiYoO2y70nKx7U2mYLpgDu385uMU=; b=PFZ4ZyGmQFBzvGwRMarvuouR4XBw4sr5jkPmBAqRPQ2Oy6phZn3tAzFn0LyOJYWUQT L7TMLDvzXLGoDNFUte7LGeqe0bPPpKXBfC5ekl8XI9ay5XmP3SErbGlXIrAHxkinQXFx d4jd6RJOXbEiZO6D0oIQc2Kwe98fn16MpPeqvJX9dRoZNHKhst5+JWlZOuJSZp4qOIgt TX+BdbUoX+OmlSPXW8llK3jvAeHZOna/+CsWigNjnNUc0sPAVClnfyv8iwpYvWOi8tVb zB6BD6jO5/Ueez1yR8/LENGERswDjBkfyzQw5yrT5nh3dO5OchvVJQn2TczzWRxSWBCN DiQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EEP91uss; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si5053344otn.232.2019.12.05.08.08.42; Thu, 05 Dec 2019 08:08:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EEP91uss; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729962AbfLEQG0 (ORCPT + 99 others); Thu, 5 Dec 2019 11:06:26 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44370 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbfLEQG0 (ORCPT ); Thu, 5 Dec 2019 11:06:26 -0500 Received: by mail-pl1-f195.google.com with SMTP id bh2so301090plb.11; Thu, 05 Dec 2019 08:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A6T5rNKNclcrc8zSiYoO2y70nKx7U2mYLpgDu385uMU=; b=EEP91ussc+X9HzK01xBWThOjZtw6K6ZrLXNzwbhx0dgAQ2+XYaUBeVBxWnz48RsOmQ wzF0BcUi17TxzODM5z06N5ysOw8YpjclnJfPSqF1G4L58tbBMLo71c4altUl4MJ9mlR1 6n6+6jKu6+dm10mC0loRoI8MTLMUhIt8wQUjfPvna6FxQZdJyVeHO0ppSNLY+Erl/o+k 1/R3gfasyxfoUDUOm890FZMyOYUK/rZ5u8gRvpg+IosslbZE7seueHOZVSvoQ8nZ4QXI pRAsRYQQzjY904SOKIjYQnrmj0ZzVe06KeuB45tFS5xZiuH5wBoHnwbFMsB1yvsmZjah PtwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A6T5rNKNclcrc8zSiYoO2y70nKx7U2mYLpgDu385uMU=; b=TbJWJOZSlDWUKoOy535Ohvoj6uAlGgeZfiYZMXOYKIpewCK6lZqUaajPwoKl275leR zzBkaesthFSKOQd7joNcqIlvtxhubofbygoKqS8gjF4yifEzrNxPXXRbvjrfnQvsIlnM w4hXn5McV0vDmhwM+iRODfdbYcNxkZm5x8qZo5OsEX/XuYpfW5H3iS0Dute2KlhNxAc/ rs3CRGyqqsQyvL/OhHJ9BPq4r5n+bkvg1MauERTrN0RqgC2YhtGqhwrqhkG5YqycIvL1 E7IxoOSeLmNLrBdOaBNZQdmnH24AbV811CdUDOKQkmTu8AAV+DIQNVdVKmQBSKejxPne Z/Ug== X-Gm-Message-State: APjAAAWei5Pa1TdMPnkDIkBG/qXP+qdilkL+t2rlvbL2z+8uE3P8rb4l 42kV6qPxtUB3114+bQ0Zuuk= X-Received: by 2002:a17:902:8494:: with SMTP id c20mr9822487plo.123.1575561985483; Thu, 05 Dec 2019 08:06:25 -0800 (PST) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.gmail.com with ESMTPSA id f8sm171321pjg.28.2019.12.05.08.06.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 08:06:24 -0800 (PST) From: Chuhong Yuan Cc: Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] pxa168fb: fix release function mismatch in probe failure Date: Fri, 6 Dec 2019 00:06:13 +0800 Message-Id: <20191205160613.32075-1-hslester96@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver uses kfree() to release the resource allocated by framebuffer_alloc(), which does not match. Use framebuffer_release() instead to fix it. Fixes: 638772c7553f ("fb: add support of LCD display controller on pxa168/910 (base layer)") Signed-off-by: Chuhong Yuan --- drivers/video/fbdev/pxa168fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c index 1410f476e135..b9435133b6f3 100644 --- a/drivers/video/fbdev/pxa168fb.c +++ b/drivers/video/fbdev/pxa168fb.c @@ -769,7 +769,7 @@ static int pxa168fb_probe(struct platform_device *pdev) dma_free_coherent(fbi->dev, info->fix.smem_len, info->screen_base, fbi->fb_start_dma); failed_free_info: - kfree(info); + framebuffer_release(info); dev_err(&pdev->dev, "frame buffer device init failed with %d\n", ret); return ret; -- 2.24.0