From: Philipp Zabel Date: Thu, 26 May 2016 15:19:39 +0000 (+0200) Subject: drm/mediatek: mtk_dpi: remove invalid error message X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=515ba6a59cbab44c989f25b2518b82491deb832e;p=openwrt%2Fstaging%2Fblogic.git drm/mediatek: mtk_dpi: remove invalid error message Do not try to dereference dpi if it is NULL. Since dpi can never be NULL when mtk_dpi_set_display_mode() is called, remove the message. Reported-by: Heinrich Schuchardt Signed-off-by: Philipp Zabel --- diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index d05ca7901315..0186e500d2a5 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -432,11 +432,6 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *dpi, unsigned long pll_rate; unsigned int factor; - if (!dpi) { - dev_err(dpi->dev, "invalid argument\n"); - return -EINVAL; - } - pix_rate = 1000UL * mode->clock; if (mode->clock <= 74000) factor = 8 * 3;