From: chenguanxi11234@163.com To: neil.armstrong@linaro.org Cc: cgel.zte@gmail.com, linux-kernel@vger.kernel.org, mripard@kernel.org, Chen Haonan <chen.haonan2@zte.com.cn>, yang.guang5@zte.com.cn, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, quic_jesszhan@quicinc.com, sam@ravnborg.org Subject: [PATCH linux-next] drm/panel: samsung: Simplify with dev_err_probe() Date: Wed, 3 Jan 2024 22:17:38 +0800 [thread overview] Message-ID: <061ed94a003362bb7d7e9d3e4d38358c5b91c8a3.1704186827.git.chen.haonan2@zte.com.cn> (raw) From: Chen Haonan <chen.haonan2@zte.com.cn> dev_err_probe() can check if the error code is -EPROBE_DEFER and can return the error code, replacing dev_err() with it simplifies the code. Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn> --- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c index 79f611963c61..f4103e762b53 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c @@ -194,10 +194,8 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi) s6->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(s6->reset_gpio)) { - ret = PTR_ERR(s6->reset_gpio); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to request GPIO (%d)\n", ret); - return ret; + return dev_err_probe(dev, PTR_ERR(s6->reset_gpio), + "failed to request GPIO\n"); } drm_panel_init(&s6->panel, dev, &s6d16d0_drm_funcs, -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: chenguanxi11234@163.com To: neil.armstrong@linaro.org Cc: cgel.zte@gmail.com, yang.guang5@zte.com.cn, quic_jesszhan@quicinc.com, sam@ravnborg.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Chen Haonan <chen.haonan2@zte.com.cn> Subject: [PATCH linux-next] drm/panel: samsung: Simplify with dev_err_probe() Date: Wed, 3 Jan 2024 22:17:38 +0800 [thread overview] Message-ID: <061ed94a003362bb7d7e9d3e4d38358c5b91c8a3.1704186827.git.chen.haonan2@zte.com.cn> (raw) From: Chen Haonan <chen.haonan2@zte.com.cn> dev_err_probe() can check if the error code is -EPROBE_DEFER and can return the error code, replacing dev_err() with it simplifies the code. Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn> --- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c index 79f611963c61..f4103e762b53 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c @@ -194,10 +194,8 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi) s6->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(s6->reset_gpio)) { - ret = PTR_ERR(s6->reset_gpio); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to request GPIO (%d)\n", ret); - return ret; + return dev_err_probe(dev, PTR_ERR(s6->reset_gpio), + "failed to request GPIO\n"); } drm_panel_init(&s6->panel, dev, &s6d16d0_drm_funcs, -- 2.25.1
next reply other threads:[~2024-01-03 14:18 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-03 14:17 chenguanxi11234 [this message] 2024-01-03 14:17 ` [PATCH linux-next] drm/panel: samsung: Simplify with dev_err_probe() chenguanxi11234 2024-01-03 17:37 ` Jessica Zhang 2024-01-03 17:37 ` Jessica Zhang 2024-01-12 9:35 ` neil.armstrong 2024-01-12 9:35 ` neil.armstrong
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=061ed94a003362bb7d7e9d3e4d38358c5b91c8a3.1704186827.git.chen.haonan2@zte.com.cn \ --to=chenguanxi11234@163.com \ --cc=cgel.zte@gmail.com \ --cc=chen.haonan2@zte.com.cn \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mripard@kernel.org \ --cc=neil.armstrong@linaro.org \ --cc=quic_jesszhan@quicinc.com \ --cc=sam@ravnborg.org \ --cc=tzimmermann@suse.de \ --cc=yang.guang5@zte.com.cn \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.