Message ID | 20240613084839.1044015-9-hch@lst.de (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | [01/12] block: initialize integrity buffer to zero before writing it to media | expand |
Context | Check | Description |
---|---|---|
mdraidci/vmtest-md-6_11-PR | fail | PR summary |
mdraidci/vmtest-md-6_11-VM_Test-0 | fail | Logs for build-kernel |
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 24671d9f90a124..58760a6d6b2209 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -247,8 +247,12 @@ static ssize_t flag_store(struct device *dev, struct device_attribute *attr, const char *page, size_t count, unsigned char flag) { struct blk_integrity *bi = dev_to_bi(dev); - char *p = (char *) page; - unsigned long val = simple_strtoul(p, &p, 10); + unsigned long val; + int err; + + err = kstrtoul(page, 10, &val); + if (err) + return err; if (val) bi->flags |= flag;