From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 608C813B284; Tue, 14 May 2024 11:32:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715686367; cv=none; b=mS78sNidsKMDj7cFMmluJQBF1YnePxVw1RL8cIHbuMc8L92sg2YGPu5xHAPQXVYRuSmfXzAO/ZTAGqqPyrmru3bEBr7m1V59aE9HqeoJQS2Fwql2U5NOSKyDEuIJw+KjnBkIOesH2U1xTHgsC/WcGkB9K7njESBefqA/2YUTZlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715686367; c=relaxed/simple; bh=ylHSxVgvTIVPvEkaG5Ce2tztpJxq08vx31/gW8vX/Pk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KXIbU+w+4fVsVXeWjBST//plHAaFOhA57Qe9YIfOwnwscSYqvgCnlUMesQbOZNBs3mMTlMAuSEYi55t54EKuTV9qcdGXQah4bX+FJmPLR2i1hrqvTOJ5uv0y7tf05ihyEOqb4/uHU9eibjQI8AO5Siy8XZ66K/bsyHrMn7BAsjM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gxabfKdv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gxabfKdv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB6C3C2BD10; Tue, 14 May 2024 11:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715686367; bh=ylHSxVgvTIVPvEkaG5Ce2tztpJxq08vx31/gW8vX/Pk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gxabfKdvBhtWHsl8aJbkD2cXwTwxhKR5an4L1xH70hb8yq9BDrpdwkJe7dwkV5Ahd CvjuKs9DxHkcppXHgj+vCaoiv8rTwxIJU2oXoQR2+cD0qYDv/sSemGyU0wjHZDGMrs 43JCNe+3FnkAldz/byfwnJ2D+cexrMibc+K6XYQc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andy Shevchenko , Neil Armstrong , Sui Jingfeng , Sasha Levin Subject: [PATCH 6.1 083/236] drm/panel: ili9341: Use predefined error codes Date: Tue, 14 May 2024 12:17:25 +0200 Message-ID: <20240514101023.522041726@linuxfoundation.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514101020.320785513@linuxfoundation.org> References: <20240514101020.320785513@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Shevchenko [ Upstream commit da85f0aaa9f21999753b01d45c0343f885a8f905 ] In one case the -1 is returned which is quite confusing code for the wrong device ID, in another the ret is returning instead of plain 0 that also confusing as readed may ask the possible meaning of positive codes, which are never the case there. Convert both to use explicit predefined error codes to make it clear what's going on there. Fixes: 5a04227326b0 ("drm/panel: Add ilitek ili9341 panel driver") Signed-off-by: Andy Shevchenko Reviewed-by: Neil Armstrong Reviewed-by: Sui Jingfeng Link: https://lore.kernel.org/r/20240425142706.2440113-4-andriy.shevchenko@linux.intel.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240425142706.2440113-4-andriy.shevchenko@linux.intel.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c index c46b5d820f5a0..285e76818d84d 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -420,7 +420,7 @@ static int ili9341_dpi_prepare(struct drm_panel *panel) ili9341_dpi_init(ili); - return ret; + return 0; } static int ili9341_dpi_enable(struct drm_panel *panel) @@ -728,7 +728,7 @@ static int ili9341_probe(struct spi_device *spi) else if (!strcmp(id->name, "yx240qv29")) return ili9341_dbi_probe(spi, dc, reset); - return -1; + return -ENODEV; } static void ili9341_remove(struct spi_device *spi) -- 2.43.0