From: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Chaotian Jing <chaotian.jing@mediatek.com>, linux-mmc@vger.kernel.org
Subject: re: mmc: mediatek: add HS400 support
Date: Sat, 2 Apr 2016 11:46:01 +0300 [thread overview]
Message-ID: <20160402084601.GA25306@mwanda> (raw)
Hello Chaotian Jing,
The patch 6397b7f5f405: "mmc: mediatek: add HS400 support" from Oct
27, 2015, leads to the following static checker warning:
drivers/mmc/host/mtk-sd.c:1320 msdc_tune_response()
error: uninitialized variable 'cmd_err'.
drivers/mmc/host/mtk-sd.c
1306 static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
1307 {
1308 struct msdc_host *host = mmc_priv(mmc);
1309 u32 rise_delay = 0, fall_delay = 0;
1310 struct msdc_delay_phase final_rise_delay, final_fall_delay;
1311 u8 final_delay, final_maxlen;
1312 int cmd_err;
^^^^^^^
1313 int i;
1314
1315 sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
1316 for (i = 0 ; i < PAD_DELAY_MAX; i++) {
1317 sdr_set_field(host->base + MSDC_PAD_TUNE,
1318 MSDC_PAD_TUNE_CMDRDLY, i);
1319 mmc_send_tuning(mmc, opcode, &cmd_err);
^^^^^^^
No error handling.
1320 if (!cmd_err)
^^^^^^^
1321 rise_delay |= (1 << i);
1322 }
regards,
dan carpenter
next reply other threads:[~2016-04-02 8:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-02 8:46 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-10 21:19 mmc: mediatek: add HS400 support Dan Carpenter
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=20160402084601.GA25306@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chaotian.jing@mediatek.com \
--cc=linux-mmc@vger.kernel.org \
/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 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.