]> git.baikalelectronics.ru Git - kernel.git/commit
atm: lanai: set error code when ioremap fails
authorPan Bian <bianpan2016@163.com>
Sat, 3 Dec 2016 12:25:45 +0000 (20:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2016 18:27:33 +0000 (13:27 -0500)
commit8877b3094d9aec0ffa9812dd67c54d8390466459
treedadbc5b83a85d7202b93c1c2dbb849a344ba96dd
parent2902b0a51ef97b784e3f085bf9d8cf0aae3b7653
atm: lanai: set error code when ioremap fails

In function lanai_dev_open(), when the call to ioremap() fails, the
value of return variable result is 0. 0 means no error in this context.
This patch fixes the bug, assigning "-ENOMEM" to result when ioremap()
returns a NULL pointer.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188791

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/lanai.c