From: Xin Ji <xji@analogixsemi.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: devel@driverdev.osuosl.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sam Ravnborg <sam@ravnborg.org>,
Hsin-Yi Wang <hsinyi@chromium.org>,
Nicolas Boichat <drinkcat@google.com>,
Andrzej Hajda <a.hajda@samsung.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@siol.net>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Pi-Hsun Shih <pihsun@chromium.org>,
Sheng Pan <span@analogixsemi.com>
Subject: Re: [PATCH v16 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP
Date: Fri, 18 Sep 2020 18:06:17 +0800 [thread overview]
Message-ID: <20200918100617.GA13792@pc-user> (raw)
In-Reply-To: <20200918084534.GV4282@kadam>
On Fri, Sep 18, 2020 at 11:45:34AM +0300, Dan Carpenter wrote:
> Hi Xin,
>
> url: https://github.com/0day-ci/linux/commits/Xin-Ji/Add-initial-support-for-slimport-anx7625/20200917-163238
> base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5925fa68fe8244651b3f78a88c4af99190a88f0d
> config: mips-randconfig-m031-20200917 (attached as .config)
> compiler: mips-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Hi Dan, OK, I'll fix it right now.
Thanks,
Xin
>
> smatch warnings:
> drivers/gpu/drm/bridge/analogix/anx7625.c:1289 anx7625_get_edid() warn: possible memory leak of 'edid'
>
> # https://github.com/0day-ci/linux/commit/667ee517c70d2bedafe5bfa0dc5f13fc60d5133d
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Xin-Ji/Add-initial-support-for-slimport-anx7625/20200917-163238
> git checkout 667ee517c70d2bedafe5bfa0dc5f13fc60d5133d
> vim +/edid +1289 drivers/gpu/drm/bridge/analogix/anx7625.c
>
> 667ee517c70d2be Xin Ji 2020-09-17 1264 static struct edid *anx7625_get_edid(struct anx7625_data *ctx)
> 667ee517c70d2be Xin Ji 2020-09-17 1265 {
> 667ee517c70d2be Xin Ji 2020-09-17 1266 struct device *dev = &ctx->client->dev;
> 667ee517c70d2be Xin Ji 2020-09-17 1267 struct s_edid_data *p_edid = &ctx->slimport_edid_p;
> 667ee517c70d2be Xin Ji 2020-09-17 1268 int edid_num;
> 667ee517c70d2be Xin Ji 2020-09-17 1269 u8 *edid;
> 667ee517c70d2be Xin Ji 2020-09-17 1270
> 667ee517c70d2be Xin Ji 2020-09-17 1271 edid = kmalloc(FOUR_BLOCK_SIZE, GFP_KERNEL);
> 667ee517c70d2be Xin Ji 2020-09-17 1272 if (!edid) {
> 667ee517c70d2be Xin Ji 2020-09-17 1273 DRM_DEV_ERROR(dev, "Fail to allocate buffer\n");
> 667ee517c70d2be Xin Ji 2020-09-17 1274 return NULL;
> 667ee517c70d2be Xin Ji 2020-09-17 1275 }
> 667ee517c70d2be Xin Ji 2020-09-17 1276
> 667ee517c70d2be Xin Ji 2020-09-17 1277 if (ctx->slimport_edid_p.edid_block_num > 0) {
> 667ee517c70d2be Xin Ji 2020-09-17 1278 memcpy(edid, ctx->slimport_edid_p.edid_raw_data,
> 667ee517c70d2be Xin Ji 2020-09-17 1279 FOUR_BLOCK_SIZE);
> 667ee517c70d2be Xin Ji 2020-09-17 1280 return (struct edid *)edid;
> 667ee517c70d2be Xin Ji 2020-09-17 1281 }
> 667ee517c70d2be Xin Ji 2020-09-17 1282
> 667ee517c70d2be Xin Ji 2020-09-17 1283 anx7625_low_power_mode_check(ctx, 1);
> 667ee517c70d2be Xin Ji 2020-09-17 1284 edid_num = sp_tx_edid_read(ctx, p_edid->edid_raw_data);
> 667ee517c70d2be Xin Ji 2020-09-17 1285 anx7625_low_power_mode_check(ctx, 0);
> 667ee517c70d2be Xin Ji 2020-09-17 1286
> 667ee517c70d2be Xin Ji 2020-09-17 1287 if (edid_num < 1) {
> 667ee517c70d2be Xin Ji 2020-09-17 1288 DRM_DEV_ERROR(dev, "Fail to read EDID: %d\n", edid_num);
> 667ee517c70d2be Xin Ji 2020-09-17 @1289 return NULL;
>
> kfree(edid); before returning.
>
> 667ee517c70d2be Xin Ji 2020-09-17 1290 }
> 667ee517c70d2be Xin Ji 2020-09-17 1291
> 667ee517c70d2be Xin Ji 2020-09-17 1292 p_edid->edid_block_num = edid_num;
> 667ee517c70d2be Xin Ji 2020-09-17 1293
> 667ee517c70d2be Xin Ji 2020-09-17 1294 memcpy(edid, ctx->slimport_edid_p.edid_raw_data, FOUR_BLOCK_SIZE);
> 667ee517c70d2be Xin Ji 2020-09-17 1295 return (struct edid *)edid;
> 667ee517c70d2be Xin Ji 2020-09-17 1296 }
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
prev parent reply other threads:[~2020-09-18 10:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 8:16 [PATCH v16 0/2] Add initial support for slimport anx7625 Xin Ji
2020-09-17 8:18 ` [PATCH v16 1/2] dt-bindings: drm/bridge: anx7625: MIPI to DP transmitter DT schema Xin Ji
2020-09-17 8:23 ` [PATCH v16 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP Xin Ji
[not found] ` <20200918084534.GV4282@kadam>
2020-09-18 10:06 ` Xin Ji [this message]
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=20200918100617.GA13792@pc-user \
--to=xji@analogixsemi.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=daniel@ffwll.ch \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@google.com \
--cc=hsinyi@chromium.org \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
--cc=pihsun@chromium.org \
--cc=sam@ravnborg.org \
--cc=span@analogixsemi.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox