MIPS: mach-ar231x: Fix uninitialized variable
Subsystems (4)
PATCH 1/4 MIPS: mach-ar231x: Fix uninitialized variable
--- arch/mips/mach-ar231x/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mach-ar231x/board.c +1 -1
@@ -111,7 +111,7 @@ static u16 ar231x_cksum16(u8 *data, int size) {int i; -u16 sum; +u16 sum =0 ;for (i =0 ; i < size; i++) sum += data[i];
Signature · 7 lines
1.8.3.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/4 gadget: at91: Fix uninitialized variable
Variable udc is used unitialized for DBG(xxx).
--- drivers/usb/gadget/at91_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/gadget/at91_udc.c +1 -2
@@ -1417,7 +1417,7 @@ static struct poller_struct poller = {static int __init at91udc_probe (struct device_d *dev) { -struct at91_udc *udc; +struct at91_udc *udc = &controller;int retval;if (!dev->platform_data) {
@@ -1427,7 +1427,6 @@ static int __init at91udc_probe(struct device_d *dev) }/* init software state */ - udc = &controller; udc->dev = dev; udc->board = *(struct at91_udc_data *) dev->platform_data; udc->enabled =0 ;
Signature · 7 lines
1.8.3.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/4 ppc 8xxx: Fix logic
In reply to Alexander ShiyanExpression (pdimm->data_width >= 32) || (pdimm->data_width <= 40) always evaluates to true, so probably we need to use "&&" here.
--- arch/ppc/ddr-8xxx/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ppc/ddr-8xxx/options.c +1 -1
@@ -48,7 +48,7 @@ uint32_t populate_memctl_options(int all_DIMMs_registered,if (pdimm->n_ranks !=0 ) {if ((pdimm->data_width >=64 ) && (pdimm->data_width <=72 )) popts->data_bus_width =0 ; -else if ((pdimm->data_width >=32 ) || +else if ((pdimm->data_width >=32 ) && (pdimm->data_width <=40 )) popts->data_bus_width =1 ;else
Signature · 7 lines
1.8.3.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/4 scripts: imx-usb-loader: Fix memory leak
In reply to Alexander Shiyan--- scripts/imx/imx-usb-loader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/imx/imx-usb-loader.c +4 -1
@@ -1334,7 +1334,7 @@ static void usage(const char *prgname)int main (int argc,char *argv[]) { -struct usb_id *p_id; +struct usb_id *p_id =NULL ;struct mach_id *mach;libusb_device **devs;libusb_device *dev;
@@ -1432,6 +1432,9 @@ int main(int argc, char *argv[]) ret =0 ; out: +if (p_id) +free (p_id); +if (h)libusb_close (h);
Signature · 7 lines
1.8.3.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 1 line · Alexander Shiyan
Signed-off-by Alexander Shiyan <[email protected]>
Applied all, thanks.
Are you running sparse or how did you find all these?
Sascha
Quoted 26 lines
--- arch/mips/mach-ar231x/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/mach-ar231x/board.c +1
-1@@ -111,7 +111,7 @@ static u16 ar231x_cksum16(u8 *data, int size) {int i; -u16 sum; +u16 sum =0 ;for (i =0 ; i < size; i++) sum += data[i];Signature · 7 lines
1.8.3.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Среда, 29 января 2014, 21:39 +01:00 от Sascha Hauer <[email protected]>:
Quoted 6 lines · Alexander Shiyan
Quoted 1 line
Signed-off-by Alexander Shiyan <[email protected]>Applied all, thanks.
Are you running sparse or how did you find all these?
I use several tools for this purpose.
Basic tools are: coccinelle, cppcheck and my own script.
---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox