gpio.c: Add fix for dereferencing of a null pointer
Signed-off-by: Cosmin Popescu <gabrielcosmin.popescu@gmail.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
committed by
Mihai Tudor Panu
parent
5169021afd
commit
9fe2883e6a
@@ -114,7 +114,7 @@ mraa_gpio_init_internal(mraa_adv_func_t* func_table, int pin)
|
|||||||
dev->isr_thread_terminating = 0;
|
dev->isr_thread_terminating = 0;
|
||||||
dev->phy_pin = -1;
|
dev->phy_pin = -1;
|
||||||
|
|
||||||
if (!plat->chardev_capable) {
|
if ((plat != NULL) && (!plat->chardev_capable)) {
|
||||||
char bu[MAX_SIZE];
|
char bu[MAX_SIZE];
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user