Re: [PATCH] sx.c: fix dbl statement if - add missing braces

From: Dan Carpenter
Date: Thu Feb 19 2009 - 07:25:17 EST


While we're at it, here is another patch for that file.

The "break" would just result in reusing a free'd pointer. I don't have the cards myself to test it though. :/

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

--- orig/drivers/char/sx.c 2009-02-19 11:27:51.000000000 +0300
+++ devel/drivers/char/sx.c 2009-02-19 11:29:05.000000000 +0300
@@ -1788,7 +1788,7 @@
nbytes - i : SX_CHUNK_SIZE)) {
kfree(tmp);
rc = -EFAULT;
- break;
+ goto out;
}
memcpy_toio(board->base2 + offset + i, tmp,
(i + SX_CHUNK_SIZE > nbytes) ?
@@ -1845,6 +1845,7 @@
rc = -ENOTTY;
break;
}
+out:
unlock_kernel();
func_exit();
return rc;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/