Loading drivers/power/supply/qcom/qpnp-qg.c +6 −0 Original line number Diff line number Diff line Loading @@ -2578,6 +2578,12 @@ static ssize_t qg_device_read(struct file *file, char __user *buf, size_t count, struct qpnp_qg *chip = file->private_data; unsigned long data_size = sizeof(chip->kdata); if (count < data_size) { pr_err("Invalid datasize %lu, expected lesser then %zu\n", data_size, count); return -EINVAL; } /* non-blocking access, return */ if (!chip->data_ready && (file->f_flags & O_NONBLOCK)) return 0; Loading Loading
drivers/power/supply/qcom/qpnp-qg.c +6 −0 Original line number Diff line number Diff line Loading @@ -2578,6 +2578,12 @@ static ssize_t qg_device_read(struct file *file, char __user *buf, size_t count, struct qpnp_qg *chip = file->private_data; unsigned long data_size = sizeof(chip->kdata); if (count < data_size) { pr_err("Invalid datasize %lu, expected lesser then %zu\n", data_size, count); return -EINVAL; } /* non-blocking access, return */ if (!chip->data_ready && (file->f_flags & O_NONBLOCK)) return 0; Loading