From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: yong.mao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [bug report] mmc: mediatek: Use data tune for CMD line tune
Date: Mon, 3 Apr 2017 17:34:42 +0300 [thread overview]
Message-ID: <20170403143442.GA23053@mwanda> (raw)
[ You didn't really add this but since you touched it maybe that means
you know how to silence this static checker warning? - dan ]
Hello yong mao,
The patch a768529d73a1: "mmc: mediatek: Use data tune for CMD line
tune" from Mar 15, 2017, leads to the following static checker
warning:
drivers/mmc/host/mtk-sd.c:1466 hs400_tune_response()
error: uninitialized symbol 'cmd_err'.
drivers/mmc/host/mtk-sd.c
1456 for (i = 0 ; i < PAD_DELAY_MAX; i++) {
1457 sdr_set_field(host->base + PAD_CMD_TUNE,
1458 PAD_CMD_TUNE_RX_DLY3, i);
1459 /*
1460 * Using the same parameters, it may sometimes pass the test,
1461 * but sometimes it may fail. To make sure the parameters are
1462 * more stable, we test each set of parameters 3 times.
1463 */
1464 for (j = 0; j < 3; j++) {
1465 mmc_send_tuning(mmc, opcode, &cmd_err);
^^^^^^^
If kzalloc() fails then cmd_err isn't initialized. We could probably
check for errors here?
1466 if (!cmd_err) {
1467 cmd_delay |= (1 << i);
1468 } else {
1469 cmd_delay &= ~(1 << i);
1470 break;
1471 }
1472 }
1473 }
regards,
dan carpenter
reply other threads:[~2017-04-03 14:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170403143442.GA23053@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=yong.mao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.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.