Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1403286 > unrolled thread
| Started by | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| First post | 2016-05-18 23:10 +0200 |
| Last post | 2016-05-23 12:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] drm/mediatek: do not dereference NULL Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-05-18 23:10 +0200
Re: [PATCH 1/1] drm/mediatek: do not dereference NULL Eric Engestrom <eric.engestrom@imgtec.com> - 2016-05-23 12:40 +0200
| From | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| Date | 2016-05-18 23:10 +0200 |
| Subject | [PATCH 1/1] drm/mediatek: do not dereference NULL |
| Message-ID | <rAgT7-7if-7@gated-at.bofh.it> |
After having verified that dpi is NULL we should not
dereference it.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index d05ca79..3dbd00d 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -433,7 +433,7 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *dpi,
unsigned int factor;
if (!dpi) {
- dev_err(dpi->dev, "invalid argument\n");
+ dev_err(NULL, "invalid argument\n");
return -EINVAL;
}
--
2.1.4
[toc] | [next] | [standalone]
| From | Eric Engestrom <eric.engestrom@imgtec.com> |
|---|---|
| Date | 2016-05-23 12:40 +0200 |
| Message-ID | <rBVrc-4Ex-43@gated-at.bofh.it> |
| In reply to | #1403286 |
On Wed, May 18, 2016 at 10:59:50PM +0200, Heinrich Schuchardt wrote:
> After having verified that dpi is NULL we should not
> dereference it.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index d05ca79..3dbd00d 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -433,7 +433,7 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *dpi,
> unsigned int factor;
>
> if (!dpi) {
> - dev_err(dpi->dev, "invalid argument\n");
> + dev_err(NULL, "invalid argument\n");
> return -EINVAL;
> }
>
> --
> 2.1.4
Seems obvious ^^
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web