modetest: Fix to check return value of asprintf()
There is warning about ignoring return value of 'asprintf'. Fix to check return value of asprintf(). Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>main
parent
1cc17744b9
commit
6736ad45d8
|
@ -656,10 +656,13 @@ static struct resources *get_resources(struct device *dev)
|
|||
for (i = 0; i < res->res->count_connectors; i++) {
|
||||
struct connector *connector = &res->connectors[i];
|
||||
drmModeConnector *conn = connector->connector;
|
||||
int num;
|
||||
|
||||
asprintf(&connector->name, "%s-%u",
|
||||
num = asprintf(&connector->name, "%s-%u",
|
||||
util_lookup_connector_type_name(conn->connector_type),
|
||||
conn->connector_type_id);
|
||||
if (num < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
#define get_properties(_res, __res, type, Type) \
|
||||
|
|
Loading…
Reference in New Issue