Files
erofs-linux/drivers/ata
Zhou Qingyang 9b6d90e208 ata: pata_platform: Fix a NULL pointer dereference in __pata_platform_probe()
In __pata_platform_probe(), devm_kzalloc() is assigned to ap->ops and
there is a dereference of it right after that, which could introduce a
NULL pointer dereference bug.

Fix this by adding a NULL check of ap->ops.

This bug was found by a static analyzer.

Builds with 'make allyesconfig' show no new warnings,
and our static analyzer no longer warns about this code.

Fixes: f3d5e4f18d ("ata: pata_of_platform: Allow to use 16-bit wide data transfer")
Signed-off-by: Zhou Qingyang <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Sergey Shtylyov <[email protected]>
2022-01-27 11:22:43 +09:00
..
…
2021-06-14 08:26:54 -06:00
2021-10-16 21:45:52 -04:00
2022-01-05 19:33:02 +09:00
…
2021-10-12 17:46:55 +09:00
…