Message ID | 1516673353-170330-1-git-send-email-weiyongjun1@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
SGkgV2VpDQoNCk9uIDAxLzIzLzIwMTggMDM6MDkgQU0sIFdlaSBZb25nanVuIHdyb3RlOg0KPiBG aXggdG8gcmV0dXJuIGEgbmVnYXRpdmUgZXJyb3IgY29kZSBmcm9tIHRoZSBlcnJvciBoYW5kbGlu Zw0KPiBjYXNlIGluc3RlYWQgb2YgMCwgYXMgZG9uZSBlbHNld2hlcmUgaW4gdGhpcyBmdW5jdGlv bi4NCj4gDQo+IEZpeGVzOiBmOWJiMzA0Y2U4NTUgKCJtbWM6IG1tY2k6IEFkZCBzdXBwb3J0IGZv ciBzZXR0aW5nIHBhZCB0eXBlIHZpYSBwaW5jdHJsIikNCj4gU2lnbmVkLW9mZi1ieTogV2VpIFlv bmdqdW4gPHdlaXlvbmdqdW4xQGh1YXdlaS5jb20+DQo+IC0tLQ0KPiAgIGRyaXZlcnMvbW1jL2hv c3QvbW1jaS5jIHwgMyArKysNCj4gICAxIGZpbGUgY2hhbmdlZCwgMyBpbnNlcnRpb25zKCspDQo+ IA0KPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9tbWMvaG9zdC9tbWNpLmMgYi9kcml2ZXJzL21tYy9o b3N0L21tY2kuYw0KPiBpbmRleCA2MjQ2ZWFhLi43MGIwZGY4IDEwMDY0NA0KPiAtLS0gYS9kcml2 ZXJzL21tYy9ob3N0L21tY2kuYw0KPiArKysgYi9kcml2ZXJzL21tYy9ob3N0L21tY2kuYw0KPiBA QCAtMTY0Niw2ICsxNjQ2LDcgQEAgc3RhdGljIGludCBtbWNpX3Byb2JlKHN0cnVjdCBhbWJhX2Rl dmljZSAqZGV2LA0KPiAgIAkJaG9zdC0+cGluY3RybCA9IGRldm1fcGluY3RybF9nZXQoJmRldi0+ ZGV2KTsNCj4gICAJCWlmIChJU19FUlIoaG9zdC0+cGluY3RybCkpIHsNCj4gICAJCQlkZXZfZXJy KC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line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 6246eaa..70b0df8 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1646,6 +1646,7 @@ static int mmci_probe(struct amba_device *dev, host->pinctrl = devm_pinctrl_get(&dev->dev); if (IS_ERR(host->pinctrl)) { dev_err(&dev->dev, "failed to get pinctrl"); + ret = PTR_ERR(host->pinctrl); goto host_free; } @@ -1653,6 +1654,7 @@ static int mmci_probe(struct amba_device *dev, PINCTRL_STATE_DEFAULT); if (IS_ERR(host->pins_default)) { dev_err(mmc_dev(mmc), "Can't select default pins\n"); + ret = PTR_ERR(host->pins_default); goto host_free; } @@ -1660,6 +1662,7 @@ static int mmci_probe(struct amba_device *dev, MMCI_PINCTRL_STATE_OPENDRAIN); if (IS_ERR(host->pins_opendrain)) { dev_err(mmc_dev(mmc), "Can't select opendrain pins\n"); + ret = PTR_ERR(host->pins_opendrain); goto host_free; } }
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f9bb304ce855 ("mmc: mmci: Add support for setting pad type via pinctrl") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- drivers/mmc/host/mmci.c | 3 +++ 1 file changed, 3 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html