OSDN Git Service

iio: dac: mcp4922: fix error handling in mcp4922_write_raw
authorMarcus Folkesson <marcus.folkesson@gmail.com>
Fri, 24 Aug 2018 20:24:40 +0000 (22:24 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 25 Aug 2018 08:47:36 +0000 (09:47 +0100)
commit0833627fc3f757a0dca11e2a9c46c96335a900ee
treeb4fe3b51463a57a51321553b6a404968bd066eb1
parente2b01faf6cde01b2ed5a7fb8a63e5fa25c2257ea
iio: dac: mcp4922: fix error handling in mcp4922_write_raw

Do not try to write negative values and make sure that the write goes well.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/mcp4922.c