msm: mdss: dp: fix hpd sysfs node
Fix the return value for hpd sysfs write function to avoid wrong data to propagate to the caller. Change-Id: Ic2282496598ecba8511f3a0a826e152451394edb Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
This commit is contained in:
parent
70a007e5b3
commit
f03a091017
1 changed files with 5 additions and 4 deletions
|
@ -1993,7 +1993,7 @@ static ssize_t mdss_dp_rda_psm(struct device *dev,
|
|||
static ssize_t mdss_dp_wta_hpd(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int hpd;
|
||||
int hpd, rc;
|
||||
ssize_t ret = strnlen(buf, PAGE_SIZE);
|
||||
struct mdss_dp_drv_pdata *dp = mdss_dp_get_drvdata(dev);
|
||||
|
||||
|
@ -2003,9 +2003,10 @@ static ssize_t mdss_dp_wta_hpd(struct device *dev,
|
|||
goto end;
|
||||
}
|
||||
|
||||
ret = kstrtoint(buf, 10, &hpd);
|
||||
if (ret) {
|
||||
pr_err("kstrtoint failed. ret=%d\n", (int)ret);
|
||||
rc = kstrtoint(buf, 10, &hpd);
|
||||
if (rc) {
|
||||
pr_err("kstrtoint failed. ret=%d\n", rc);
|
||||
ret = rc;
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue