Skip to content

Commit fa695db

Browse files
andy-shevgregkh
authored andcommitted
drm/panel: ili9341: Use predefined error codes
[ Upstream commit da85f0a ] 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: 5a04227 ("drm/panel: Add ilitek ili9341 panel driver") Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent 1055cdd commit fa695db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: drivers/gpu/drm/panel/panel-ilitek-ili9341.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ static int ili9341_dpi_prepare(struct drm_panel *panel)
422422

423423
ili9341_dpi_init(ili);
424424

425-
return ret;
425+
return 0;
426426
}
427427

428428
static int ili9341_dpi_enable(struct drm_panel *panel)
@@ -726,7 +726,7 @@ static int ili9341_probe(struct spi_device *spi)
726726
else if (!strcmp(id->name, "yx240qv29"))
727727
return ili9341_dbi_probe(spi, dc, reset);
728728

729-
return -1;
729+
return -ENODEV;
730730
}
731731

732732
static void ili9341_remove(struct spi_device *spi)

0 commit comments

Comments
 (0)