applicom: dereferencing NULL on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 May 2014 11:59:16 +0000 (14:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:11:52 +0000 (20:11 -0700)
commitaf671dd21da6751d7f0512e19facac4e36d74d8c
tree4f8c2c14fd79982ad9d831cb9a6fcb84594cef6a
parentd78c4fefa3b55f22a2670797951c4fa7e6f1119b
applicom: dereferencing NULL on error path

commit 8bab797c6e5724a43b7666ad70860712365cdb71 upstream.

This is a static checker fix.  The "dev" variable is always NULL after
the while statement so we would be dereferencing a NULL pointer here.

Fixes: 819a3eba4233 ('[PATCH] applicom: fix error handling')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/applicom.c