diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-25 02:20:27 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-28 19:42:56 +0100 |
commit | 185af4d6668e4805d18d1bdf21dfec89d680fee3 (patch) | |
tree | 48b74b3bf021e6ef362d24b4b485aeda43a95b2f /drivers/input/mouse/psmouse-base.c | |
parent | Input: vsxxxaa - fix code dropping bytes from queue (diff) | |
download | linux-185af4d6668e4805d18d1bdf21dfec89d680fee3.tar.xz linux-185af4d6668e4805d18d1bdf21dfec89d680fee3.zip |
Input: psmouse - remove unneeded check in psmouse_reconnect()
psmouse_reconnect() will not be called if psmouse driver is not bound to
the serio port, so there is no point in checking that. Also, as coded, it
introduces potential NULL dereference in psmouse_dbg() in case psmouse is
indeed NULL. Let's just remove it.
Detected by Coverity: CID 146528
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 26994f6a2b2a..95a3a6e2faf6 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -1536,16 +1536,9 @@ static int psmouse_reconnect(struct serio *serio) { struct psmouse *psmouse = serio_get_drvdata(serio); struct psmouse *parent = NULL; - struct serio_driver *drv = serio->drv; unsigned char type; int rc = -1; - if (!drv || !psmouse) { - psmouse_dbg(psmouse, - "reconnect request, but serio is disconnected, ignoring...\n"); - return -1; - } - mutex_lock(&psmouse_mutex); if (serio->parent && serio->id.type == SERIO_PS_PSTHRU) { |