From nobody Sun Feb 8 15:59:26 2026 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D027A284B58 for ; Thu, 8 Jan 2026 20:01:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767902463; cv=none; b=Y1OE3FEUdss/v6leW5O5fPX4m69IQdPrmmPvcgfItC+OHnJg62t0qa23xJ0p7QK7ceDHTTx47Y+DBsagrlGEhpBJl2YnQI9goRd7Hn58RXw9XUyhg/fm5rbaI6m0VMEKheZdyTjegGdAuCZ0At1xHa+KPdvMYzUW8NJjlenrsQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767902463; c=relaxed/simple; bh=DE6Sp1xOrVBNsH6sK2fuRAlXsqjZwLxh07gWzBcBmtg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=BKaFTmswdfEBFwhM0psviB+PX5CaIjHPbRnKdSsPN6TDIE9TMmK/MnuTJua0YyqRNYBI5kc6968oYgy2pw8S+Dtj9/QtW8SOBhIrIFdOEl+6Dj77hq1LoRZgX8QzmFspUahbwZ4d2aecPD7gdlmOnGqpiX+ZL4bDADi8Ytcsnac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Y1rGkU88; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Y1rGkU88" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-42fbc544b09so2531255f8f.1 for ; Thu, 08 Jan 2026 12:01:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767902460; x=1768507260; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=0R59JhP2h+GNKoVP+C9/jngayGQfqzbzM8akEAfrgYo=; b=Y1rGkU88DBRDx2fqYoyOlsxxs3rrpmhY1BfRnda5oPhYQRfxp4ctXH3jIXEVX43lN+ MHpT7EsALTnyHg+IDnR1CITsEpi1FeXp2nxJ+tePwcWa3a8xtmli3JqFv/I7KCAMuO+w tSYKxXhTdYhtLRYOZSvHWpdGMQ8I8vYqGSI5deKdediM+/3BneYNf3Uv5UZZqZMTOH8j /hZXl3HHS91FZ/JhMSgKKqsYVCG+CLgpDYhoI0zqlmMPyjmZ+RwVqjCxKWV6/h9cSA3s f854u6tN7dBLjX2z6hCXdGF7hGijrxENL5XNa5WJa1mq0RQmFIuQqsKUGOO3zobvi/3y ZloA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767902460; x=1768507260; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0R59JhP2h+GNKoVP+C9/jngayGQfqzbzM8akEAfrgYo=; b=CPU4/Fy3zoRpDLYP7xoS4w8j78KOrQSWpXEyzKRfMx4ZBTLyh7OpdCuB6Q5ZP0zhvN 7b4N2LPxPovFNPEvHR9+dBY5h1u1CMXFzRIzeAE/XN1DcWfL8+VYP+SiVGQrbWwHDiJR ivlK/Ng6sRX/SNarMlo0aofXdEvjIdqfDCKy0HlKHYhrWRIUfI76rRA6tyvX80N6m2N2 luieNf/MjXyOifANliEMHPINpijMps5Q5TafBmCuAFbStsyXs2XaIetI2ElcO6Q3TOHD /x4bEBIB8SpECEqiNp3L09ZFOzqDrYFM1/yZQI+xZmwrn2/lewXsWwcdAyd1vTyOWQNH 475w== X-Forwarded-Encrypted: i=1; AJvYcCUApBJ9jOQNg2Nzv93N4bUNCnu1JZPz//bwn4Ofhnid/4Ko9kUazICZ6DrQAcoPAxlmfYQECwNnKu6mQCI=@vger.kernel.org X-Gm-Message-State: AOJu0YwZnVfvymo4t2X8NY2aNjXkjLgW9MksNXhXsKLrF9eEWThFrwwJ 6pZw1V/VBI55RhPrRSxqqmLh+cxvEaZMyNy6l6hY6fw2pOdP20TNC5ozO4oE2YpZDag= X-Gm-Gg: AY/fxX7h4wG7JMmHtPYkctIkFFWeIhvCamiW3xt7yA2i1zwDx5niKbaR/I9dyNO07zD tJ4B4VtkvCZtMLmwSVZSjyDZhcg9E95sWK6fND7/FLUUqbrwU/Tx+c1UPx6AyzFQjcNOb9Dsrer s0thHcsURSiRnd7UiEC+C3dnLpkyx6cykdBYHFuLGip5n/Few3A55v7+8ymrgwVg0cuB7NU2UEH CnPYtyKp/6Qf3DS+EPDFUSCA7lFVYuBwVDhlMCqoe+JAgxINz/MTRESVGViow9NnrHwgPxCF3OD uLR/fXIUNMdiRnKg5c7vFdI7FTve1OtxltxRISMNbwBXRCmGP/4y5UzL6Lco+OXf6s3H+z/JTiy t8pDI/Z6GvxFq7QSzZGa7rLYU0aVXhIVHwxVK9eoTofjuKAIxZGHJK0V21I59SEWpx2nQXoCmo5 pYpmVoFnv7BEPNiG2Y X-Google-Smtp-Source: AGHT+IE0npwunWACAYL+5K87C4JawJUGa/VvYRBjPWPZGKZYwiEeVeAPHCRJ0OWPGNFKQWH85CyAbg== X-Received: by 2002:a05:6000:4287:b0:430:f494:6aad with SMTP id ffacd0b85a97d-432c378a7dfmr8823298f8f.2.1767902460211; Thu, 08 Jan 2026 12:01:00 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5edb7esm17838263f8f.30.2026.01.08.12.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jan 2026 12:00:59 -0800 (PST) Date: Thu, 8 Jan 2026 23:00:57 +0300 From: Dan Carpenter To: Helge Deller Cc: Thomas Zimmermann , linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] fbdev: omapfb: remove duplicate check in omapfb_setup_mem() Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" We know "size" is non-zero because it is checked on the line before. Delete the duplicate check and pull the code in a tab. Signed-off-by: Dan Carpenter --- drivers/video/fbdev/omap/omapfb_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/o= map/omapfb_main.c index 106d21e74738..a8740213e891 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -846,12 +846,10 @@ static int omapfb_setup_mem(struct fb_info *fbi, stru= ct omapfb_mem_info *mi) * be reenabled unless its size is > 0. */ if (old_size !=3D size && size) { - if (size) { - memcpy(new_var, &fbi->var, sizeof(*new_var)); - r =3D set_fb_var(fbi, new_var); - if (r < 0) - goto out; - } + memcpy(new_var, &fbi->var, sizeof(*new_var)); + r =3D set_fb_var(fbi, new_var); + if (r < 0) + goto out; } =20 if (fbdev->ctrl->sync) --=20 2.51.0